Skip to content
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

Fix: Do not configure deprecated braces fixer #638

Merged
merged 1 commit into from
May 1, 2023

Conversation

localheinz
Copy link
Member

@localheinz localheinz commented Apr 27, 2023

What is the reason for this PR?

  • stops configuring the deprecated braces fixer

πŸ’β€β™‚οΈ Running

vendor/bin/php-cs-fixer fix --diff --verbose

on current main yields

PHP CS Fixer 3.16.0 BoY42 by Fabien Potencier and Dariusz Ruminski.
PHP runtime: 8.1.17
Loaded config faker from "/Users/am/Sites/FakerPHP/Faker/.php-cs-fixer.dist.php".
Using cache file ".build/php-cs-fixer/cache".
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS 301 / 686 ( 44%)
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS.SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS 602 / 686 ( 88%)
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS                                                                                                                                                                                                                          686 / 686 (100%)
Legend: .-no changes, F-fixed, S-skipped (cached or empty file), I-invalid file syntax (file ignored), E-error

Fixed 0 of 686 files in 0.191 seconds, 16.000 MB memory used

Detected deprecations in use:
- Rule "braces" is deprecated. Use "single_space_around_construct", "control_structure_braces", "curly_braces_position", "control_structure_continuation_position", "declare_parentheses", "statement_indentation", "no_multiple_statements_per_line" and "no_extra_blank_lines" instead.

Author's checklist

Summary of changes

Review checklist

  • All checks have passed
  • Changes are approved by maintainer

@localheinz localheinz added the bug Something isn't working label Apr 27, 2023
@pimjansen
Copy link

What does it actually do?

@localheinz
Copy link
Member Author

@pimjansen

The braces fixer has been split up, see PHP-CS-Fixer/PHP-CS-Fixer#4885.

Comment on lines -54 to -56
'braces' => [
'allow_single_line_anonymous_class_with_empty_body' => true,
],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/v3.16.0/src/Fixer/Basic/BracesFixer.php#L211-L235 for how the maintainers of friendsofphp/php-cs-fixer replaced the configuration of the braces fixer by proxying to newly created fixers.

@bram-pkg bram-pkg merged commit 71997e4 into FakerPHP:main May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants