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
[5.1] Updating php-cs-fixer and php_codesniffer to latest versions #42603
Conversation
@Hackwar The composer.lock shows much more being updated than only what the description of this PR says. Is that the result of a plain |
I did a |
I merged the necessary codestyle changes into this PR as well. No need to keep 2 PRs open for this... |
@Hackwar @brianteeman 's comment in the other, closed PR is still valid for this PR here, and I agree with him: #42604 (comment) . For "elseif" or "case" statements, the comments are before the corresponding "elseif" or case". The CS fixer now intends them by 4 more spaces because it assumes that these comments are referring to the actual "if" or "elseif" or "case" and not the one starting in the line below. E.g. for "elseif" in file administrator/components/com_categories/src/Model/CategoriesModel.php in line 267 and 268:
Or for the "case" in file administrator/components/com_finder/src/Indexer/Adapter.php in lines 929 and 930:
It would be better readable if we would move these comments to the line below where they belong to, e.g. for "elseif" in file administrator/components/com_categories/src/Model/CategoriesModel.php:
Or for the "case" in file administrator/components/com_finder/src/Indexer/Adapter.php:
That's just a suggestion, I would not insist on it, and I know it requires some manual work. But I think the better readability would make it be worth the work. |
fix php-cs comments ident and position
plugins/content/pagenavigation/src/Extension/PageNavigation.php
Outdated
Show resolved
Hide resolved
* Use "no_trailing_comma_in_singleline" instead of deprecated "no_trailing_comma_in_list_call"
* fixes after replacing deprecated rule 'no_trailing_comma_in_list_call' with 'no_trailing_comma_in_singleline'
PR php-cs-fixer configuration update - deprecated rule |
php-cs-fixer configuration update - deprecated rule
Fix phpcs - Blank line at end of control structure
administrator/components/com_installer/src/Model/UpdatesitesModel.php
Outdated
Show resolved
Hide resolved
administrator/components/com_installer/src/Model/UpdatesitesModel.php
Outdated
Show resolved
Hide resolved
Co-authored-by: Quy <quy@nomonkeybiz.com>
Co-authored-by: Quy <quy@nomonkeybiz.com>
I have tested this item ✅ successfully on 9760312 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42603. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code review looks fine. I think if either of the symfony upgrades did anything we'd have bigger problems plus system tests would pick it up as they're much deeper libraries
Just a not here, I did always do the |
Thanks @laoneo for the new version hint for CS Fixer - updated. |
Not addressing #42603 (comment) ?? |
It was partly addressed. Some "case" statements have been fixed, but none of the "elseifs" or "else". |
@LadySolveig Since your last commit, this PR has conflicts. And the issue which I had mentioned with my big comment has been addressed only partly, see my previous comment. |
@richard it is not very clear to me why you did not address this when @Razzo1987 contacted you directly when he has done the manually clean up here 620d3e0 could you please clean up the the remaining comments for the |
@LadySolveig Well I saw it was dealing only with the “case” statements so I assumed the other things will be done later. My first comment was very clear, I think. |
Unfortunately doing it directly without a pr (not good practice) has already been partially undone by subsequent pull requests eg #42667 |
I am not sure if I have understood you correctly, but I resolved the conflicts yesterday and made sure that the fixes for the comments remain as @Razzo1987 has already fixed them for us. @brianteeman have I overlooked something here somewhere? @richard67 I had the impression that we agreed here in the discussion with the maintainers that it would be easier to fix this directly here in the PR. But if the opinion has changed here I will merge and we will fix the rest later as you suggested in your comment. |
@LadySolveig Sorry in case if I’ve caused some confusion. Yes, it would be easier to fix it now, but we can do that also later. I don’t insist in my suggestions and am ok with merging the PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rest looks ok by code review
In the meantime, both codestyle packages have released new versions... |
Thank you ! |
Summary of Changes
This updates php-cs-fixer and php_codesniffer to the latest versions respectively. I'd like to do this now since that removes a deprecated package.
Testing Instructions
Everything should behave like before.
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed