-
-
Notifications
You must be signed in to change notification settings - Fork 704
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
Rector reports spaces as error on Windows #5444
Comments
Hi, the 0.8 is quite old. It's recommended to use 0.9 now. Be sure to upgrade first. |
There is another way to install it? Or is required to be in the composer.json? Can I use it as a global installation? I still use PHP 7.2, to generate documentation only, so I can't update rector 0.9 in my composer.json. If this is an issue with WIndows only I can ignore it for now.
I don't know how to start 😅 |
@nelson6e65 you may can try with composer update rector/rector:^0.9 --ignore-platform-reqs and verify if it fixed in 0.9 version. If 0.9 fixed the issue, you may need to upgrade your php version to php 7.3+. |
@samsonasik I only use PHP 7.2 on CI to build the documentation for my library. I'm had not migrated to phpDocumentor 3, I'm still using 3.9, which is not compatible with PHP 7.3+. Locally, I use PHP 7.4 (as the first image I attached). I'll try to upgrade to Rector 0.9 and use |
Btw, there is PHP 7.1 compatible version: https://github.com/rectorphp/rector-php71 |
This does not applies to 0.9. All works fine after the upgrade. Ignoring platform allows me to run Thanks for your help. I was just using an old version. |
By the way:
|
Global installation or any other proven to be very problematic. Rector is trying to work with the worst code possible, so the least requirement is to be installed as dependency with full access to autoloader. So I hope you manage to resolve your dependendencies to get to PHP 7.3.
How does this version work? |
It's the same problem. My library (https://github.com/nelson6e65/php_nml) is compatible with 7.2+. So I have will need to add I just want to skip installation of Rector when using PHP 7.2 to build my documentation.
😓😓😓 Thanks for your help. |
Oh, rector-php71 work on PHP 7.1-7.4 |
I ended up by allowing Rector 0.8: This allows me to use 0.9 to check problems on my supported PHP versions and build the documentation with PHP 7.2 on Netlify without failing due to incompatible version (Rector is not necessary for this). Thanks for your support! 😀 |
rectorphp/rector-src@b71c326 fix: RenameMethodRector should handle NullsafeMethodCall (#5444)
Bug Report
I run a composer script to perform linting with Rector and is reporting error. The same codebase is failing on Windows but works fine on Linux.
CI Workflow run:
⛔ https://github.com/nelson6e65/rector-issue-ex/actions/runs/544525144
Minimal PHP Code Causing Issue
Minimal reproduction repo: https://github.com/nelson6e65/rector-issue-ex/tree/4b6ab04b4d614579d37407a58842f57a35a07c2e
Expected Behaviour
Simple spaces/lines should not be reported as error.
The text was updated successfully, but these errors were encountered: