Bump friendsofphp/php-cs-fixer to 3.x in /composer/helpers/v1#5694
Closed
jeffwidman wants to merge 1 commit intodependabot:mainfrom
Closed
Bump friendsofphp/php-cs-fixer to 3.x in /composer/helpers/v1#5694jeffwidman wants to merge 1 commit intodependabot:mainfrom
friendsofphp/php-cs-fixer to 3.x in /composer/helpers/v1#5694jeffwidman wants to merge 1 commit intodependabot:mainfrom
Conversation
40aa8d6 to
d57a89a
Compare
Member
Author
|
Oh interesting, the rebase on #5691 followed the file rename w/o creating a conflict... very impressive Mr |
Bumped to V3 in order to fix the following deprecation warnings: ``` 15.95 > php-cs-fixer fix --diff --verbose '--dry-run' 16.10 You are running PHP CS Fixer v2, which is not maintained anymore. Please update to v3. 16.10 You may find an UPGRADE guide at https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/v3.3.0/UPGRADE-v3.md . 16.10 If you need help while solving warnings, ask at https://gitter.im/PHP-CS-Fixer, we will help you! 16.10 16.10 PHP CS Fixer 2.19.3 Testament by Fabien Potencier and Dariusz Ruminski 16.10 Runtime: PHP 7.4.30 16.10 Loaded config default from "/opt/composer/v1/.php_cs". 16.14 ...... 16.26 Legend: ?-unknown, I-invalid file syntax (file ignored), S-skipped (cached or empty file), .-no changes, F-fixed, E-error 16.26 16.26 Checked all files in 0.134 seconds, 14.000 MB memory used 16.26 16.26 Detected deprecations in use: 16.26 - Option "ensure_fully_multiline" for rule "method_argument_space" is deprecated and will be removed in version 3.0. Use option "on_multiline" instead. 16.26 - Option "use_yoda_style" for rule "is_null" is deprecated and will be removed in version 3.0. Use "yoda_style" fixer instead. 16.26 - PhpCsFixer\Config::create is deprecated since 2.17 and will be removed in 3.0, use the constructor instead. 16.26 - Rule "no_multiline_whitespace_before_semicolons" is deprecated. Use "multiline_whitespace_before_semicolons" instead. ``` I also removed a couple of rules to make the config file consistent with the changes made in https://github.com/dependabot/dependabot-core/pull/3840/files. As best I can tell, the removed rules were removed because their defaults changed to match what we were specifying. The one curious change was `method_argument_space`, as the default _did_ change, but not to what we were specifying. For now I thought simplest to match the other config and put up the PR and see if it complains at all. If so, I can dig in further.
d57a89a to
c2f195d
Compare
jeffwidman
commented
Sep 13, 2022
| }, | ||
| "require-dev": { | ||
| "friendsofphp/php-cs-fixer": "^2.9", | ||
| "friendsofphp/php-cs-fixer": "^3.0", |
Member
Author
There was a problem hiding this comment.
So after chasing this a while, this won't work:
php-cs-fixerrequirescomposer/semver>= 3.0: https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/abf6c314b99bd6dc156ab8e39967956141d8594c/composer.json#L20 - this bump landed as part of the3.0milestone forphp-cs-fixer, so can't just downgrade to an earlier v3 release.composerv1 requirescomposer/semver^1: https://github.com/composer/composer/blob/9c86ff9fff272bd0953c58ec793e62626dafaa00/composer.json#L27
Bummer, but not a huge deal given that composer v1 support is essentially EOL at this point, and this PR gave me what I wanted which was an opportunity to learn how Composer works.
jeffwidman
added a commit
to jeffwidman/dependabot-core
that referenced
this pull request
Sep 13, 2022
Fix the following warnings: ``` 15.95 > php-cs-fixer fix --diff --verbose '--dry-run' 16.10 You are running PHP CS Fixer v2, which is not maintained anymore. Please update to v3. 16.10 You may find an UPGRADE guide at https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/v3.3.0/UPGRADE-v3.md . 16.10 If you need help while solving warnings, ask at https://gitter.im/PHP-CS-Fixer, we will help you! 16.10 16.10 PHP CS Fixer 2.19.3 Testament by Fabien Potencier and Dariusz Ruminski 16.10 Runtime: PHP 7.4.30 16.10 Loaded config default from "/opt/composer/v1/.php_cs". 16.14 ...... 16.26 Legend: ?-unknown, I-invalid file syntax (file ignored), S-skipped (cached or empty file), .-no changes, F-fixed, E-error 16.26 16.26 Checked all files in 0.134 seconds, 14.000 MB memory used 16.26 16.26 Detected deprecations in use: 16.26 - Option "ensure_fully_multiline" for rule "method_argument_space" is deprecated and will be removed in version 3.0. Use option "on_multiline" instead. 16.26 - Option "use_yoda_style" for rule "is_null" is deprecated and will be removed in version 3.0. Use "yoda_style" fixer instead. 16.26 - PhpCsFixer\Config::create is deprecated since 2.17 and will be removed in 3.0, use the constructor instead. 16.26 - Rule "no_multiline_whitespace_before_semicolons" is deprecated. Use "multiline_whitespace_before_semicolons" instead. ``` Originally I tried bumping `php-cs-fixer` to `v3` as suggested. But in dependabot#5694 I realized that was impossible given that `composer/composer` `v1` depended `composer/semver` `^v1` but `php-cs-fixer` `v3` requires `composer/semver` `v3`... So for now just fix some old deprecation warnings and move on. At least I got what I really wanted from this, which was to learn how Composer works.
Member
Author
|
Closing in favor of #5713 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumped to V3 in order to fix the following deprecation warnings:
I also removed a couple of rules to make the config file consistent with the changes made in
https://github.com/dependabot/dependabot-core/pull/3840/files.
As best I can tell, the removed rules were removed because their defaults changed to match what we were specifying. The one curious change was
method_argument_space, as the default did change, but not to what we were specifying. For now I thought simplest to match the other config and put up the PR and see if it complains at all. If so, I can dig in further.