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

PHP formatter #1814

Merged
merged 4 commits into from
Oct 1, 2024
Merged

PHP formatter #1814

merged 4 commits into from
Oct 1, 2024

Conversation

ajparsons
Copy link
Contributor

@ajparsons ajparsons commented Aug 23, 2024

Adds php-cs-fixer as a formatter for php files.

  • Reasonably quick - stores a cache after first run so not horrible when just editing a few files.
  • Has rules by php version - so can initially get us consistent on array() vs [] - and we can adjust this as we go into php 8.

I've separated the two rules into two commits to show what it's doing at each step. This includes removing older style syntax.

When approved, the last two commits will be undone and rerun on whatever the state of master is at that point. Ideally this is when there are few PHP touching PRs outstanding.

@ajparsons
Copy link
Contributor Author

Now has a rule to put braces on the same line for classes and functions.

@ajparsons ajparsons requested a review from dracos October 1, 2024 10:57
@ajparsons ajparsons merged commit 81b00a3 into master Oct 1, 2024
8 checks passed
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