User tests: Successful: Unsuccessful:
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.
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;
to return;
or the trailing comma on multi-line arrays.
Status | New | ⇒ | Pending |
Labels |
Added:
?
?
|
Without writing custom fixers pretty much. It can also do some stuff we do
as a practice but not enforced in the standard like variable or array
key/value alignment. Considering we're one of the few who have standards
vastly opposite of PSR-2 there's only so much that can be pulled from the
source repo.
On Friday, July 1, 2016, Walt Sorensen notifications@github.com wrote:
So this mostly just fixes coding standards issues related to PSR-1 and
PSR-2?—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#10992 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AAWfoYQ7wnkEWNMcnim0llBqFC-Xua3yks5qRdiqgaJpZM4JDhHt
.
Labels |
Category | ⇒ | Code style |
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
While I was trying to apply patch using patch tester first it took long time to apply then suddenly getting white page. Enabled error reporting to development but still not showing any error and just showing white/blank page. There is nothing in view source as well.
But when I have downloaded https://codeload.github.com/mbabker/joomla-cms/zip/phpcs-fixer and install joomla using it that works.
I have tested joomla backend using gherkin scenarios and found it working.
Note: I haven't tested as per given testing info.
Review the package's documentation to ensure the selected fixers are in line with the project's code style rules
but I have tested that after this patch joomla admin works normally or not.
I have tested this item
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
Checked all applied fixers with description at https://github.com/FriendsOfPhp/PHP-CS-Fixer
and compared with coding standards http://joomla.github.io/coding-standards/?coding-standards/chapters/php.md
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.
Status | Pending | ⇒ | Ready to Commit |
Labels |
Labels |
Added:
?
|
Milestone |
Added: |
Done
So this mostly just fixes coding standards issues related to PSR-1 and PSR-2?