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

feat: Symfony.trailing_comma_in_multiline - adjust configuration #8161

Merged
merged 5 commits into from
Aug 30, 2024

Conversation

keradus
Copy link
Member

@keradus keradus commented Aug 7, 2024

haha, another case how to handle config configuration that is dependent on PHP version

@keradus keradus marked this pull request as draft August 7, 2024 22:55
@coveralls
Copy link

coveralls commented Aug 7, 2024

Coverage Status

coverage: 95.128% (+0.002%) from 95.126%
when pulling ee62cf0 on keradus:asd
into 1e4b0f2 on PHP-CS-Fixer:master.

@keradus keradus marked this pull request as ready for review August 18, 2024 14:22
Copy link
Contributor

@SpacePossum SpacePossum left a comment

Choose a reason for hiding this comment

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

New option has been added so this PR might need updating.
Maybe:

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

@keradus
Copy link
Member Author

keradus commented Aug 30, 2024

thanks @SpacePossum

for after_heredoc, moving to separated PR: #8188

@keradus keradus merged commit df2b6c2 into PHP-CS-Fixer:master Aug 30, 2024
27 of 28 checks passed
@keradus keradus deleted the asd branch August 30, 2024 22:49
@spawnia
Copy link

spawnia commented Sep 1, 2024

Are we supposed to run php-cs-fixer on the minimum supported PHP version in a project? What am I supposed to do for a library that still supports PHP 7.4, but my local installation of PHP is 8.3?

@kubawerlos
Copy link
Contributor

@spawnia if your library still supports PHP 7.4, as PHP CS Fixer itself, you need to go with only PHP 7.4 options, as PHP CS Fixer itself does: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/v3.64.0/src/RuleSet/Sets/PhpCsFixerSet.php#L123

@spawnia
Copy link

spawnia commented Sep 1, 2024

I see, so there is no version detection magic going on. We are extending the Symfony config, which explains why this change broke our project. Thank you for the response.

@kubawerlos
Copy link
Contributor

No, there is no such detection, might happen in the future, there is a discussion about this: #7312.

spawnia added a commit to mll-lab/php-cs-fixer-config that referenced this pull request Sep 2, 2024
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.

5 participants