Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useful rector rules? #5

Open
sunnysideup opened this issue Sep 29, 2022 · 3 comments
Open

useful rector rules? #5

sunnysideup opened this issue Sep 29, 2022 · 3 comments

Comments

@sunnysideup
Copy link
Author

sunnysideup commented Sep 29, 2022

If you like I can show you how I use these tools. It would be good to work together.

@wernerkrauss
Copy link
Owner

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 SilverstripeSetLists and SilverstripeLevelSetLists 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.

@sunnysideup
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants