Closed weerd closed 4 years ago
I was able to compare what conflicts exists between formatting from Prettier and the PHP CS Fixer and resolved any conflicts.
However, I plan on applying this process to Rogue as well since it is a larger code base and may showcase other conflicting rules I need to address. But this is a great start!
What's this PR do?
This pull request adds PHP CS Fixer tool to help format/lint our PHP. It uses a new ruleset based on the Laravel ruleset but modified to account for differences with Prettier to avoid conflicts in formatting. If you do check the formatting changes, it looks like it was mostly import statement ordering fixes and docblock fixes.
How should this be reviewed?
Do not review via the "Files changed" tab or you might have faint; a number of PHP files got formatted.
You mostly just need to check out the following commits:
The tool is run via
composer
(typically run within your Homestead). It can be run using thecomposer format
command.Any background context you want to provide?
This relates to RFC #11 for PHP Code Formatting. In a previous PR, Prettier was configured to format our PHP code. This next step applies the use of PHP CS Fixer tool to help with linting and any additional formatting not handled by Prettier.
Relevant tickets
References Pivotal #174412695.
Checklist