Skip to content

Conversation

@mawiswiss
Copy link
Member

Here we go. I went through all the issues we had. Solved them and cleaned up more issues.

Since we're adding PER Coding Style 2.0 (https://www.php-fig.org/per/coding-style/), it's a major release.
I ran it on a local project, and I could auto-fix all changes. The following rules had to be changed:

  • PhpCsFixer\Fixer\Operator\ConcatSpaceFixer::class
  • PhpCsFixer\Fixer\ControlStructure\TrailingCommaInMultilineFixer::class
  • PhpCsFixer\Fixer\FunctionNotation\FunctionDeclarationFixer::class
  • PhpCsFixer\Fixer\Basic\SingleLineEmptyBodyFixer::class
  • PhpCsFixer\Fixer\Operator\NewWithParenthesesFixer::class
  • PhpCsFixer\Fixer\ClassNotation\ClassDefinitionFixer::class

The updates @rugbymauri is working on with CS Fixer aren't ready yet, and I created a milestone for those adjustments. Once this is ready, we see if there's another major needed or if it's backwards compatible. For now, I want to release those adjustments to have a clean base again.

@mawiswiss mawiswiss added this to the v2.0.0 milestone Dec 10, 2024
@mawiswiss mawiswiss requested a review from tuxes3 December 10, 2024 06:15
@mawiswiss mawiswiss self-assigned this Dec 10, 2024
@mawiswiss mawiswiss force-pushed the release/v2.0.0 branch 2 times, most recently from 595eab2 to e778bb3 Compare December 10, 2024 06:41
@rugbymauri
Copy link
Contributor

the SymfonySet defines

'single_line_empty_body' => false, // overrides @PER-CS2.0

https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/src/RuleSet/Sets/SymfonySet.php#L206

our ECS config enforces it

@rugbymauri
Copy link
Contributor

Same issuse

            'trailing_comma_in_multiline' => [
                'after_heredoc' => true,
                'elements' => [ // explicitly omit 'arguments'
                    'array_destructuring',
                    'arrays',
                    'match',
                    'parameters',
                ],
            ],

https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/src/RuleSet/Sets/SymfonySet.php#L219

our ECS enforces for 'arguments'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants