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
Update recipe for PHP-CS-Fixer 2.19.0 and 3.0.0 #942
Conversation
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.
Pull request passes validation.
}, | ||
"gitignore": [ | ||
"/.php-cs-fixer.php", | ||
"/.php_cs.cache" |
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.
Nor sure about that @keradus
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.
PHP CS Fixer uses:
.php_cs.cache
for 2.x.php-cs-fixer.cache
for 3.x
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.
Ah so we need to keep .php_cs.cache
for 2.x and add another recipe for 3.x with .php-cs-fixer.cache
?
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.
yes
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.
Ok done
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.
The name is configurable though. I'd suggest to configure PHP CS Fixer to use the new cache file name so we don't need different recipes for 2.19 and 3.0.
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.
@derrabus good point for maint, but wouldnt it be best to stick with the conventions used in 3.0
? thinking in terms of DX and consistency - e.g. maker-bundle
will use php-cs-fixer
3.0
but does not depend on recipes. However in our test cases, we do depend on recipes and I can see the potential of the bundle vs tests being out of sync.
Another use case would be for other bundles e.g. symfonycasts
|| knplabs
that try to stick as close as possible Symfony conventions. It would be nice to keep php-cs-fixer
's configuration && .gitignore
inline with Symfony w/o having to use custom naming conventions.
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.
Maybe sth like this: https://github.com/symfony/recipes/pull/942/files#r625770976
then, 2.x and 3.x will use same name of cache file
(and that line can be removed on 3.x, as .php-cs-fixer.cache
is default name on 3.x)
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.
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.
Pull request passes validation.
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.
Pull request passes validation.
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.
Pull request passes validation.
I added the recipe for 3.0 to this PR with the new cache file |
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.
mabye worth to mention 3.0 in PR title too
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.
Pull request passes validation.
Done @keradus |
This PR was squashed before being merged into the 1.0-dev branch. Discussion ---------- [ci] upgrade php-cs-fixer 2.x -> 3.0 - [ ] depends on symfony/recipes#942 - [x] depends on #868 - [x] depends on #869 Commits ------- 2396836 [ci] upgrade php-cs-fixer 2.x -> 3.0
Co-authored-by: Dariusz Rumiński <dariusz.ruminski@gmail.com>
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.
Pull request passes validation.
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.
Pull request passes validation.
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.
Pull request passes validation.
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.
Pull request passes validation.
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.
Pull request passes validation.
Please check again |
Following https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/tag/v2.19.0
More specific:
minor #5607 DX: new config filename (keradus)
cc @keradus