Skip to content

Bump to php-cs-fixer v3.1 #5045

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 31, 2021

Conversation

paulbalandan
Copy link
Member

Description
New fixers applied:

  • declare_parentheses
  • empty_loop_body
  • removed deprecated class_keyword_remove
  • types_spaces
  • new option for class_definition

Only fixer with effect is the new option of class_definition adding a space before the parenthesis of anonymous class instantiation to line it with PSR12 requirement that anonymous classes should follow and behave like closures.

Checklist:

  • Securely signed commits

@sfadschm
Copy link
Contributor

I may be blind, but should the composer.json not be updated with 3.1?

Copy link
Member

@MGatner MGatner left a comment

Choose a reason for hiding this comment

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

I would not have guessed class_definition, rather the opposite since I always thought of the "class" as a stand-in for the actual class name, so the parentheses were adjoining for construction. I like the consistency with Closure you pointed out though.

@MGatner
Copy link
Member

MGatner commented Aug 31, 2021

@sfadschm You're not wrong, it's a bit confusing. This will ultimate land at https://github.com/CodeIgniter/coding-standard which will be applied here, but the easiest way to see the effects of each rule (especially while we're getting set up) is to apply them to the framework directly. I'm sure Paul will bump the Composer version at the source repo when it is ready. See also #5038

@sfadschm
Copy link
Contributor

Oh right. Just thought the fixer might complain in the checks, when its on 3.0 but some rules are from 3.1.
This does not seem to be the case, so all good :-)

@paulbalandan paulbalandan merged commit cca4660 into codeigniter4:develop Aug 31, 2021
@paulbalandan paulbalandan deleted the php-cs-fixer-v3.1 branch August 31, 2021 12:40
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