-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
Enhancement: Add support for rector/rector:~0.6.0 #176
Conversation
975fa2e
to
3d226da
Compare
conflicts again. please remove the commit where you regenerate the file. |
a075ef2
to
c2438c9
Compare
Rebased! |
rector-migrate.yml
Outdated
zip_entry_open: 'Safe\zip_entry_open' | ||
zip_entry_read: 'Safe\zip_entry_read' | ||
zlib_decode: 'Safe\zlib_decode' | ||
$oldFunctionToNewFunction |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't it a typo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this line is making the pipeline fail
b970293
to
4402f5d
Compare
f0fe776
to
3d96207
Compare
.travis.yml
Outdated
@@ -61,7 +61,9 @@ script: | |||
echo "Generated files are different from commited files. Please run './safe.php generate' command and commit the results." | |||
exit 1; | |||
fi | |||
- cd generator/tests/rector/default && composer install && composer rector && composer test && cd ../../../.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This ensures that using rector-migrate.yml
is still possible.
This works fine now, do you want to take another look? |
I don't know much about rector. If I understand correctly, we allow rector 0.6 support while still keeping the compatibility with 0.5? If so, i will merge it. |
Yes, that's it. Since This way, users of |
If of any help, this works for me using Rector v0.6. |
Perhaps @TomasVotruba can have a quick look and confirm? |
Better go with 0.6.7. There've been some changes |
README.md
Outdated
$ composer require --dev rector/rector:~0.5 | ||
``` | ||
|
||
to install `rector/rector:~0.5`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part can be dropped, as very obsolete version. It also conflicts with PHPStan 0.11-, so extra troubles for no gain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
My take on this: we can keep support for rector:0.5 (in order to not break compatibility with users using old Rector) but we should definitely stop advertising this possibility in the README (the README should only contain information about the latest minor version)
README.md
Outdated
|
||
```bash | ||
vendor/bin/rector process src/ --config vendor/thecodingmachine/safe/rector-migrate.yml | ||
$ vendor/bin/rector process src/ --config vendor/thecodingmachine/safe/rector-migrate-0.6.yml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better support just one minor Rector version, this is rather confusing even to me
}, | ||
"require": { | ||
"php": ">=7.1", | ||
"rector/rector": "^0.6" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rector 0.6 require PHP 7.2, so it can be bumped as well to be real
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updating the minimum PHP version is a BC. This requires a new major version of the entire library...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This a test file.
And bumping PHP version is not a BC break, as it only narrows scope.
I'm an happy user of both Rector and Safe. Reading your comments, one strange idea came to my mind: what if the support for Safe is provided directly by Rector? This way, Safe remain an independent very useful package that doesn't break each time Rector is updated... As told, this is a strange idea 😅 |
Well you're right, that's what 99 % projects do :D so feel free to send PR there! EDIT: Think of it as Symfony Flex with just with upgrade recipes |
cb776ed
to
0911c2a
Compare
0911c2a
to
66c9cc2
Compare
Thank you for your feedback, @TomasVotruba - I made a few adjustments here! |
Thank you, @Aerendir, @Kharhamel, @moufmoufm and @TomasVotruba! |
I don't understand... Where should have I to submit the PR? I'm not the owner nor I'm involved in the Safe library: I have no decision power about it... What should have I to do? |
The example would the best. If something in Symfony 3.3 changes, it should be added here: For this package and version, it would be:
|
@TomasVotruba , ok, now it is clear: so, it sufficient to copy the current file @localheinz , WDYT about this? Can I submit the PR to Rector: have I your permission? |
👍 |
Ping |
Perhaps we can find a way to automatically open a pull request whenever we have any changes in the corresponding YAML file? Maybe using https://github.com/gr2m/create-or-update-pull-request-action? |
There you go: rectorphp/rector#3078 You can update the set path: -vendor/bin/rector process src --config vendor/thecodingmachine/safe/rector-migrate-0.7.yml
+vendor/bin/rector process src --config vendor/rector/rector/config/set/thecodingmachine/safe07.yaml |
This PR
rector/rector:~0.6.0
Fixes #167.