-
-
Notifications
You must be signed in to change notification settings - Fork 699
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
Feedback from using rector for the first time #1195
Comments
Thank you for your feedback. I'm interested! This is basically shim issue. E.g. your code uses php-parser 3.0, but Rector uses php-parser 4.0. It can have 2 versions of 1 class, e.g. with extra typehint → error. See identical issues: https://github.com/rectorphp/rector/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Awaits-on-prefixed This can be solved only by prefixed Rector. There is repository |
Thanks for explaining! It is not quite clear what needs to be done in rectorphp/compiler to fix it. But I don't have time to work on it right now anyway. One thing I'm unsure about: Is the docker image using prefixed or non-prefixed version? In my opinion the ideal way to use rector would be dockerized prefixed version. Anyway prefixed version of rector seems like a necessity to me. Most applications that could benefit from using rector are very likely to have conflicts with the normal version in my opinion. |
Me neither, it's not an easy task.
Prefixed version of course, when it's ready.
Agreed 👍 |
Closing as answered and duplicate of #985 Any PR to improve docs and compiler are welcomed 👍 |
rectorphp/rector-src@3747b9e [CI] Add generate changelog helper command (#1195)
I have an application with some outdated dependencies and found out I need to update Twig to namespaces because Roave/SecurityAdvisories won't allow anything below Twig 2.7 (because of this vulnerability) which throws deprections when using
Twig_
classes. So I thought I'd solve it easily with Rector.Since you're generally trying to make your packages as easy to use as possible I think you might be interested in the problems I ran into. For Rector in particular ease of use with outdated application is high priority in my opinion. If you're not interested in this feedback, feel free to close the issue.
Looking at the installation section in readme there seem to be 3 ways:
composer require rector/rector --dev
composer require rector/rector-prefixed --dev
docker run -v $(pwd):/project rector/rector:latest ...
Long story short, none worked for me. It seems Rector is not so easy to use as I expected after all.
Normal installation
I fully expected a conflict with the normal version of course since some of my dependencies are outdated.
Prefixed version
I don't really understand why the prefixed version requires a non-prefixed PHPStan. For the record my application is using PHPStan 0.8. I've updated it on the dev branch of the project already, however I need to use Rector on the stable branch where it is not updated (and won't be).
Docker image
Running this caused a lot of errors to appear which I have 0 idea what they mean or how I can fix them. Maybe it's again caused by some incompatibilities? Here is only a small subset of the errors.
The text was updated successfully, but these errors were encountered: