-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Add support for PHP-CS-Fixer #10992
Add support for PHP-CS-Fixer #10992
Conversation
So this mostly just fixes coding standards issues related to PSR-1 and PSR-2? |
Without writing custom fixers pretty much. It can also do some stuff we do On Friday, July 1, 2016, Walt Sorensen notifications@github.com wrote:
|
Thumbs up for the auto code fixer. To safely test this PR, why not breaking it into smaller peaces? |
@laoneo We have another set of auto code fixers with the in development update to PHPCS2. There is still some work to be done verifying the code style coverage is valid and testing/verifying the fixers. |
I have tested this item 🔴 unsuccessfully on f4653fb This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10992. |
But when I have downloaded https://codeload.github.com/mbabker/joomla-cms/zip/phpcs-fixer and install joomla using it that works. Note: I haven't tested as per given testing info.
but I have tested that after this patch joomla admin works normally or not. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10992. |
I have tested this item ✅ successfully on f4653fb This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10992. |
Also wants to mention that I haven't checked all the area of admin. I have checked Users, Content, Category, Access Group and levels. |
I have tested this item ✅ successfully on f4653fb Applied patch 2days ago. Joomla worked fine without any issues 'til now. Code review of all files of this PR. Tested .php_cs configuration with several 3rd-party libraries and custom extensions and FE /components/ several hours and added "wrong code styles". Success. Couldn't find any break of Joomla Coding Standards produced by PHP-CS-Fixer. Just "nicer" and more consistent code than before. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10992. |
RTC This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/10992. |
@mbabker Rebase this please |
Done |
* Add dev dependency for php-cs-fixer * Add php-cs-fixer config for libraries/cms folder * Add all libraries files to php-cs-fixer config, ignore config file in build script
* Add dev dependency for php-cs-fixer * Add php-cs-fixer config for libraries/cms folder * Add all libraries files to php-cs-fixer config, ignore config file in build script
Summary of Changes
Adds support for the PHP-CS-Fixer tool as a means to help programmatically review and correct code style issues in PHP code. This initial implementation only includes the non-third-party libraries directory code.
Testing Instructions
Review the package's documentation to ensure the selected fixers are in line with the project's code style rules and review the changes made (sorry it's a lot of files but it's either that or do a PR for a couple directories at a time) to ensure they are consistent with the project's code style rules.
Note some changes in here are more for consistency and behavior than a PHPCS enforcement such as changing
return null;
toreturn;
or the trailing comma on multi-line arrays.