Open sunnysideup opened 1 year ago
If you like I can show you how I use these tools. It would be good to work together.
HI @sunnysideup of course collaboration is good. Did you also configure deprecation replacements using rector? How does your "replacements" config work?
I'd like to configure as much as possible in Rector (from SS4 on). I created SilverstripeSetList
s and SilverstripeLevelSetList
s for each minor release since 4.0 and plan to fill them by time.
See also the new docs for an explanation of the project specific rector rules.
Sorry, it has taken me almost a year to respond!
Replacements are just straight replacements.
"SS_Log::":
R: "SS_Log::"
C: "SS_Log: Replaced with a PSR-3 logger (https://docs.silverstripe.org/en/4/changelogs/4.0.0#psr3-logging)"
Searches for SS_Log
and replaces it with R (in this case the same). It also adds a comment if it is not a straight replacement from A to B.
I guess I'd love to use this tool and contribute to it.
Our rector rules (outdated!)
https://github.com/sunnysideup/silverstripe-easy-coding-standards/blob/master/rector.php
SS3 - SS4:
tasks
https://github.com/sunnysideup/silverstripe-upgrade_to_silverstripe_4/tree/master/src/Tasks/IndividualTasks
steps
https://github.com/sunnysideup/silverstripe-upgrade_to_silverstripe_4/blob/master/src/UpgradeRecipes/Ss3ToSs4.php
replacements
https://github.com/sunnysideup/silverstripe-upgrade_to_silverstripe_4/blob/master/ReplacementData/SS4/.upgrade.replacements.yml