- Issue created by @urvashi_vora
Hii, @urvashi_vora
These are the steps I followed:
1. Took clone from git version 1.0.x in drupal 10.1.x
2. Ran this command:
./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig modules/contrib/seb/
3. Applied your patch and, again ran phpcs command
found errors.
4. Fixed the errors and provide the patch.
Please Review.
- Status changed to Needs work
about 1 year ago 12:25am 27 September 2023 - šµšPhilippines clarkssquared
Hi Satish_kumar,
I tried to apply your patch using git apply -v but the patch skips and fails to apply, please look at the result in my terminal below:
seb git:(master) ā curl https://www.drupal.org/files/issues/2023-09-21/coding-standard-fixed-3372227-2.patch | git apply -v % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4056 100 4056 0 0 15392 0 --:--:-- --:--:-- --:--:-- 15905 Skipped patch 'README.md'. Skipped patch 'seb.info.yml'. Skipped patch 'src/Plugin/Block/EntityBlock.php'. Skipped patch 'src/Plugin/Derivative/EntityBlock.php'.
I then used the patch -p1 approach and the patch was applied except for seb.info.yml because it's been rejected
ā seb git:(master) ā curl https://www.drupal.org/files/issues/2023-09-21/coding-standard-fixed-3372227-2.patch | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 4056 100 4056 0 0 11585 0 --:--:-- --:--:-- --:--:-- 11825 patching file README.md patching file seb.info.yml 1 out of 1 hunks failed--saving rejects to seb.info.yml.rej patching file 'src/Plugin/Block/EntityBlock.php' patching file 'src/Plugin/Derivative/EntityBlock.php'
I then tried to execute the PHPCS command but there are still many PHPCS issues being flagged, for your reference, below are the issues being flagged:
ā contrib git:(master) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml seb FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/seb/README.md -------------------------------------------------------------------------------------- FOUND 1 ERROR AND 7 WARNINGS AFFECTING 8 LINES -------------------------------------------------------------------------------------- 3 | WARNING | [ ] Line exceeds 80 characters; contains 151 characters 5 | WARNING | [ ] Line exceeds 80 characters; contains 89 characters 7 | WARNING | [ ] Line exceeds 80 characters; contains 96 characters 12 | WARNING | [ ] Line exceeds 80 characters; contains 112 characters 14 | WARNING | [ ] Line exceeds 80 characters; contains 133 characters 18 | WARNING | [ ] Line exceeds 80 characters; contains 142 characters 22 | WARNING | [ ] Line exceeds 80 characters; contains 120 characters 28 | ERROR | [x] Expected 1 newline at end of file; 0 found -------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------- FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/seb/seb.info.yml ------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------- 1 | WARNING | Remove "project" from the info file, it will be added by drupal.org packaging automatically 1 | WARNING | Remove "datestamp" from the info file, it will be added by drupal.org packaging automatically 1 | WARNING | Remove "version" from the info file, it will be added by drupal.org packaging automatically ------------------------------------------------------------------------------------------------------------- FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/seb/src/Plugin/Derivative/EntityBlock.php ------------------------------------------------------------------------------------------------------------------ FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------ 83 | WARNING | [x] 'TODO: Add proper config dependencies.' should match the format '@todo Fix problem X here.' ------------------------------------------------------------------------------------------------------------------ PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------ FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/seb/src/Plugin/Block/EntityBlock.php ------------------------------------------------------------------------------------------------------------------------------ FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------ 12 | 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 ------------------------------------------------------------------------------------------------------------------------------ Time: 324ms; Memory: 14MB ā contrib git:(master) ā
- š®š³India sakthi_dev
Hi @clarkssquared, I tried to apply the #2 patch and it applied successfully and no issues lists for phpcs. After one more review we can move to RTBC, Attaching the screenshot.
- Status changed to Needs review
about 1 year ago 5:23am 28 September 2023 - Status changed to RTBC
about 1 year ago 5:28am 28 September 2023 - š®š³India aayushDrupal
Hi,
The #2 patch was successfully applied with no remaining issues listed for phpcs. Please refer to the attached screenshot for your reference and verification.
Moving to RTBC .
Thanks. - First commit to issue fork.
- @syammohanmp opened merge request.
- 9d2e4bf2 committed on 1.0.x
#3372227: Drupal standard fixes.
- 9d2e4bf2 committed on 1.0.x
- Status changed to Fixed
about 1 year ago 6:55am 28 September 2023 Automatically closed - issue fixed for 2 weeks with no activity.