[12.x] reapply Pint style changes #55015
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@taylorotwell please do not merge right away. in this final Pint fix, we have a conflict with StyleCI, and I'm not sure if there's a way to adjust the rules to get them to play nice, without StyleCI immediately reverting the changes.
we're in a little bit of a chicken/egg situation due to StyleCIs rules, which seems to have some inconsistencies on if it wants opening braces for an anonymous class on a newline or the same line.
I think we've reached to point where we need to decide if we're dropping StyleCI in favor of Pint, which would be my vote.
However, prior to doing that, we would need to setup Pint in the Github Actions pipeline, which I believe would probably need to be handled by the Laravel team. As discussed in a previous PR, we have 2 options for using Pint in our CI.
pint --test
to either pass or fail the PR, and force the contributor to ensure style rules are followed. they can do this manually, or runpint
to automatically apply fixes. (my vote)pint
in CI and have it auto-commit changesbelow is a simple Github Action job I've used for projects before: