Skip to content

Conversation

@rosier
Copy link
Contributor

@rosier rosier commented Oct 9, 2025

This PR simplifies the Finder config and removes the rules that are already part of the Symfony ruleset

->notPath('public/index.php')
->notPath('importmap.php')
;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The current Finder config first includes the whole project dir and then basically excludes everything but 'src' and 'tests'. This can be simplified to include just 'src' and 'tests'.

'no_useless_else' => true,
'no_useless_return' => true,
'php_unit_strict' => true,
'phpdoc_order' => true,
Copy link
Contributor Author

@rosier rosier Oct 9, 2025

Choose a reason for hiding this comment

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

This rule is also part of the Symfony ruleset but with a different order. To me it makes more sense for the Symfony Demo Application to use the same order as the Symfony project.

'phpdoc_order' => true,
'strict_comparison' => true,
'strict_param' => true,
'blank_line_between_import_groups' => false,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This rule is set to the opposite of the rule that is part of the Symfony ruleset. Again I think it makes more sense to follow the Symfony project.

Copy link
Member

Choose a reason for hiding this comment

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

The result is pretty ugly in my opinion ... but you are completely right. Following the Symfony practices strictly should be the goal of this repository. Thanks.

@javiereguiluz
Copy link
Member

This is one of those things that often gets neglected as "unimportant", so it never gets updated. But as you've shown here, it actually matters ... for example, to stay aligned with Symfony's best practices.

Thanks a lot, Jan, for taking the time to update this!

@javiereguiluz javiereguiluz merged commit edd624a into symfony:main Oct 15, 2025
8 checks passed
@rosier rosier deleted the php-cs-fixer-config branch October 15, 2025 17:47
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