- Issue created by @paraderojether
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 5:57am 23 May 2023 - last update
over 1 year ago 1 pass - šµšPhilippines paraderojether
Created a patch to fix the issues reported by phpcs.
Please review.
Thank You. - Status changed to RTBC
over 1 year ago 9:24am 23 May 2023 - š¬š§United Kingdom schillerm
Hi, reviewed and tested a patched version of the 8.x-1.x-dev module on a local D9 site.
I ran
phpcs --standard=Drupal --ignore=PATCHES.txt --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/content_editing_message
No errors or warnings returned, so moving to RTBC.
- Assigned to Jay Jangid
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 9:46am 23 May 2023 - š®š³India Jay Jangid
Apply patch #2 showing this error.
See screenshot.
Thank you. - last update
over 1 year ago 1 pass - šµšPhilippines paraderojether
I updated the patch.
Please review again.
Thank You. - Status changed to Needs work
over 1 year ago 7:28am 24 May 2023 - š®š¹Italy apaderno Brescia, š®š¹
- $this->messenger()->addStatus($this->t('Message <a href=":url">%label</a> has been updated.', ['%label' => $content_editing_message->label(), ':url' => $content_editing_message->toUrl('edit-form')->toString()])); + $this->messenger()->addStatus($this->t( + 'Message <a href=":url">%label</a> has been updated.', + [ + '%label' => $content_editing_message->label(), + ':url' => $content_editing_message->toUrl('edit-form')->toString(), + ] + ));
- $this->messenger()->addStatus($this->t('Message <a href=":url">%label</a> has been added.', ['%label' => $content_editing_message->label(), ':url' => $content_editing_message->toUrl('edit-form')->toString()])); + $this->messenger()->addStatus($this->t( + 'Message <a href=":url">%label</a> has been added.', + [ + '%label' => $content_editing_message->label(), + ':url' => $content_editing_message->toUrl('edit-form')->toString(), + ] + ));
The code is not correctly indented.
- Status changed to Needs review
over 1 year ago 7:54am 24 May 2023 - last update
over 1 year ago 1 pass - š®š³India Raveen Kumar
Hello guys.
I have reviewed & implemented the #8 patch on to my drupal website having version - 9.5.9 & PHP version - 8.1
I am confirming that after using #patch8, the phpcs issues were resolved completely. As you can see in the attached screenshot.
Please & thank you. - š®š³India dev16.addweb
Even after applying the patch, I continued to receive this kind of problem.
FILE: ...l_10_2_6/web/modules/contrib/content_editing_message/tests/src/Unit/ContentEditingMessageTest.php
-------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------
46 | WARNING | [x] A comma should follow the last multiline array item. Found: ]
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------FILE: ...pal_10_2_6/web/modules/contrib/content_editing_message/src/Form/ContentEditingMessageFormBase.php
-------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 2 LINES
-------------------------------------------------------------------------------------------------------
195 | ERROR | [x] Expected 1 space after FOREACH keyword; 0 found
195 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------FILE: ...l_10_2_6/web/modules/contrib/content_editing_message/src/Form/ContentEditingMessageDeleteForm.php
-------------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------
7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
| | Drupal\Core\Form\FormStateInterface.
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------FILE: ...6/web/modules/contrib/content_editing_message/src/Controller/ContentEditingMessageListBuilder.php
-------------------------------------------------------------------------------------------------------
FOUND 2 ERRORS AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------
70 | ERROR | [x] Expected 1 space after IF keyword; 0 found
70 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------FILE: .../web/web/drupal_10_2_6/web/modules/contrib/content_editing_message/content_editing_message.module
-------------------------------------------------------------------------------------------------------
FOUND 9 ERRORS AFFECTING 5 LINES
-------------------------------------------------------------------------------------------------------
9 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is
| | Drupal\Core\Entity\EntityInterface.
66 | ERROR | [x] Expected 1 space after IF keyword; 0 found
66 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
70 | ERROR | [x] Expected newline after closing brace
70 | ERROR | [x] Expected 1 space after ELSEIF keyword; 0 found
70 | ERROR | [x] Expected 1 space after closing parenthesis; found 0
81 | ERROR | [ ] All functions defined in a module file must be prefixed with the module's name,
| | found "append_message" but expected "content_editing_message_append_message"
81 | ERROR | [x] Expected 1 space before opening brace; found 0
110 | ERROR | [x] Expected 1 blank line after function; 0 found
-------------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 8 MARKED SNIFF VIOLATIONS AUTOMATICALLY
-------------------------------------------------------------------------------------------------------I have fixed all the issues reported by phpcs.
- Status changed to Needs work
6 months ago 5:33pm 24 May 2024 - šµšPhilippines roberttabigue
Hi @silvi,
After applying your Patch #10 to the Content Editing Messages module against 8.x-1.x-dev on Drupal 10, I still see 1 PHPCS warning.
See below:FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/content_editing_message/src/Form/ContentEditingMessageFormBase.php --------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE --------------------------------------------------------------------------------------------------------------------------------------------------- 194 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead --------------------------------------------------------------------------------------------------------------------------------------------------- Time: 159ms; Memory: 12MB
I ran this command on the module:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml content_editing_message
Please see the attached files for reference.
I'm moving this now to Needs work.
Thank you!
- Open on Drupal.org āCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
6 months ago Not currently mergeable. - last update
6 months ago 1 pass - last update
6 months ago PHPLint Failed - Status changed to Needs review
6 months ago 10:13am 25 May 2024 - šµšPhilippines clarkssquared
HI
I applied the updated MR !3 and I see some PHPCS issue below:
ā content_editing_message git:(55518f7) curl https://git.drupalcode.org/project/content_editing_message/-/merge_requests/3.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 8506 0 8506 0 0 14703 0 --:--:-- --:--:-- --:--:-- 14896 patching file README.md patching file content_editing_message.module patching file 'src/Controller/ContentEditingMessageListBuilder.php' patching file 'src/Form/ContentEditingMessageDeleteForm.php' patching file 'src/Form/ContentEditingMessageFormBase.php' patching file 'tests/src/Unit/ContentEditingMessageTest.php' ā content_editing_message git:(55518f7) ā .. ā contrib git:(master) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml content_editing_message FILE: ...web/modules/contrib/content_editing_message/content_editing_message.module -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 82 | ERROR | All functions defined in a module file must be prefixed with the | | module's name, found "append_message" but expected | | "content_editing_message_append_message" -------------------------------------------------------------------------------- FILE: ...contrib/content_editing_message/src/Form/ContentEditingMessageFormBase.php -------------------------------------------------------------------------------- FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES -------------------------------------------------------------------------------- 194 | WARNING | [ ] \Drupal calls should be avoided in classes, use dependency | | injection instead 301 | WARNING | [x] A comma should follow the last multiline array item. | | Found: ) 313 | ERROR | [ ] The array declaration extends to column 125 (the limit is | | 80). The array content should be split up over multiple | | lines -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- Time: 266ms; Memory: 12MB ā contrib git:(master) ā
Retaining this to needs review for others to give feedback.
- First commit to issue fork.
-
sovimi ā
committed ee3afcb6 on 8.x-1.x authored by
avpaderno ā
Issue #3362033: Fix the issues reported by phpcs
-
sovimi ā
committed ee3afcb6 on 8.x-1.x authored by
avpaderno ā
Hi all!
The issues have been fixed and the MR merged. Will be on the next release.
Thank you for you contributions!