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

Add PHP-CS-Fixer #487

Merged
merged 1 commit into from
Aug 6, 2024
Merged

Add PHP-CS-Fixer #487

merged 1 commit into from
Aug 6, 2024

Conversation

HypeMC
Copy link
Contributor

@HypeMC HypeMC commented Jul 28, 2024

This repo seems to be the only one that doesn't use PHP-CS-Fixer, which is a bit annoying when trying to contribute since I have to manually worry about coding standards. I'm not sure if there's a specific reason for that, so I decided to give it a try in this PR.

I took the .php-cs-fixer.dist.php from the framework repo and made a few adjustments. I removed nullable_type_declaration and nullable_type_declaration_for_default_null_value since those are part of the standard Symfony set. Additionally, I set modernize_strpos to false since the bundle still supports PHP >= 7.2.

I'm not sure how to run it in the CI, as some repos use fabbot while others, like the MakerBundle, use GitHub Actions.

It would be best to hide whitespace changes while reviewing.

uses: shivammathur/setup-php@v2

with:
php-version: 8.1
Copy link
Member

Choose a reason for hiding this comment

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

Why not 8.3?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just copied the highest PHP version, didn't notice 8.2 & 8.3 are missing, fixed.

@HypeMC HypeMC force-pushed the add-cs-fixer branch 2 times, most recently from 681c5ec to 5c78812 Compare July 29, 2024 08:34
@derrabus
Copy link
Member

derrabus commented Aug 6, 2024

Thank you @HypeMC.

@derrabus derrabus merged commit 502856f into symfony:master Aug 6, 2024
9 checks passed
@HypeMC HypeMC deleted the add-cs-fixer branch August 6, 2024 10:02
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.

3 participants