Skip to content

chore: PHP CS Fixer - restore PHP / PHPUnit rulesets #61371

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

Merged
merged 1 commit into from
Aug 12, 2025

Conversation

keradus
Copy link
Member

@keradus keradus commented Aug 9, 2025

Q A
Branch? 7.4
Bug fix? no
New feature? no
Deprecations? no
Issues Fix CS
License MIT

relates to 5d4e211#r163638626 , showing:

  • possible improvements to codebase that those ruleset can still offer (especially when targetting newest possible target version)
  • and also preventing old way to still be in use, if someone forget to use new syntax/methods

with love by PHP Coding Standards Fixer

@carsonbot carsonbot added this to the 7.4 milestone Aug 9, 2025
@carsonbot carsonbot changed the title chore: PHP CS Fixer - restore PHP / PHPUnit rulesets chore: PHP CS Fixer - restore PHP / PHPUnit rulesets Aug 9, 2025
@alexandre-daubois
Copy link
Member

I don't know if we should use 0o notation, IIRC most other languages use the 0 prefix

@keradus
Copy link
Member Author

keradus commented Aug 11, 2025

well, Fixer relies here on explicit octal PHP notation

@alexandre-daubois
Copy link
Member

Alright, not a big fan of it, but I'm not strongly against it either

@nicolas-grekas
Copy link
Member

Thank you @keradus.

@nicolas-grekas nicolas-grekas merged commit 89cbf6c into symfony:7.4 Aug 12, 2025
12 of 14 checks passed
@keradus keradus deleted the 7.4_CS branch August 13, 2025 14:50
nicolas-grekas added a commit that referenced this pull request Aug 13, 2025
This PR was merged into the 7.4 branch.

Discussion
----------

 chore: PHP CS Fixer - update heredoc handling

| Q             | A
| ------------- | ---
| Branch?       | 7.4
| Bug fix?      | no
| New feature?  | no <!-- please update src/**/CHANGELOG.md files -->
| Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Issues        | Fix CS <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead -->
| License       | MIT

Inspired while #61371 , but can be merged separately.

``@PHPxMigration`` and ``@Symfony`` ruleset have different config for those rules. I assume the difference is coming from supporting pre-7.2 PHP version earlier in the codebase, where heredoc closure and trailing comma had to be on separated lines - but it's no longer the case.

Can we benefit from newer PHP syntax and incorporate those changes? (yes, `trailing_comma_in_multiline`, part of ``@Symfony``, is already having this enabled!)
if so, i will also merge them into ``@Symfony`` ruleset itself afterwards.

with love by [PHP Coding Standards Fixer](https://cs.symfony.com/)

Commits
-------

f995622  chore: PHP CS Fixer - update heredoc handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants