- Issue created by @chandansha
- Merge request !36config_pages-3424331/3424331-fix-the-issues: fixed all phpcs issue except 2 โ (Open) created by chandansha
- last update
10 months ago 7 pass - Status changed to Needs review
10 months ago 4:40am 29 February 2024 - ๐ฎ๐ณIndia chandansha
fixed all issue. But still there are some issues left.
Please have a look.FILE: /home/chandansha/docker/testd10/web/modules/issue/config_pages-3424331/src/ConfigPagesTypeForm.php -------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------------------------------- 118 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead -------------------------------------------------------------------------------------------------------- FILE: /home/chandansha/docker/testd10/web/modules/issue/config_pages-3424331/src/Controller/ConfigPagesController.php --------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE --------------------------------------------------------------------------------------------------------------------- 169 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead --------------------------------------------------------------------------------------------------------------------- Time: 547ms; Memory: 12MB
- Status changed to Needs work
10 months ago 7:56am 29 February 2024 - ๐ต๐ญPhilippines clarkssquared
Hi
I applied MR !36 and I confirmed that it fixes most of the PHPCS issues stated above, but since there are few remaining PHPCS issues I will move this ticket to needs work so that all PHPCS issues will be resolved.
โ config_pages git:(master) โ curl https://git.drupalcode.org/project/config_pages/-/merge_requests/36.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 25607 0 25607 0 0 46401 0 --:--:-- --:--:-- --:--:-- 47071 patching file config_pages.module patching file 'src/Command/GetValueCommand.php' patching file 'src/Command/SetValueCommand.php' patching file 'src/ConfigPagesAccessControlHandler.php' patching file 'src/ConfigPagesContextBase.php' patching file 'src/ConfigPagesContextManager.php' patching file 'src/ConfigPagesForm.php' patching file 'src/ConfigPagesListBuilder.php' patching file 'src/ConfigPagesPermissions.php' patching file 'src/ConfigPagesTypeForm.php' patching file 'src/ConfigPagesTypeListBuilder.php' patching file 'src/Controller/ConfigPagesController.php' patching file 'src/Entity/ConfigPages.php' patching file 'src/Entity/ConfigPagesType.php' patching file 'src/Form/ConfigPagesClearConfirmationForm.php' patching file 'src/Plugin/Block/ConfigPagesBlock.php' patching file 'src/Plugin/Condition/ConfigPagesValueAccess.php' 1 out of 3 hunks failed--saving rejects to 'src/Plugin/Condition/ConfigPagesValueAccess.php.rej' patching file 'tests/src/Functional/ClearConfigPageTest.php' patching file 'tests/src/Functional/DeleteConfigPageTypeTest.php' โ config_pages git:(master) โ .. โ contrib git:(master) โ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml config_pages FILE: ...rojects/d9/d9-local/web/modules/contrib/config_pages/config_pages.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: ...dules/contrib/config_pages/src/Plugin/Condition/ConfigPagesValueAccess.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE -------------------------------------------------------------------------------- 217 | WARNING | Unused variable $cp_type. 217 | WARNING | Unused variable $data_type. -------------------------------------------------------------------------------- FILE: .../web/modules/contrib/config_pages/src/Controller/ConfigPagesController.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 169 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead -------------------------------------------------------------------------------- FILE: ...s/d9/d9-local/web/modules/contrib/config_pages/src/ConfigPagesTypeForm.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE -------------------------------------------------------------------------------- 118 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead -------------------------------------------------------------------------------- Time: 858ms; Memory: 12MB โ contrib git:(master) โ
- First commit to issue fork.
- last update
10 months ago 7 pass - Status changed to Needs review
10 months ago 12:49pm 6 March 2024 - ๐ฎ๐ณIndia Yashaswi18
Hello, I checked out to the branch '3424331-fix-the-issues' and ran the command phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,js,info,txt,md,yml.
Found no errors or warnings remaining.
- Status changed to Needs work
10 months ago 8:34am 11 March 2024 - ๐ต๐ญPhilippines paraderojether
Hi sakthi_dev,
I reviewed MR!36, and the MR is not applied cleanly I tried git apply -v and patch -p1 but I'm getting the error shown below:
jetherparadero@PrometSources-MacBook-Pro config_pages % curl https://git.drupalcode.org/project/config_pages/-/merge_requests/36.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 29496 0 29496 0 0 39377 0 --:--:-- --:--:-- --:--:-- 39698 patching file config_pages.module patching file 'src/Command/GetValueCommand.php' patching file 'src/Command/SetValueCommand.php' patching file 'src/ConfigPagesAccessControlHandler.php' patching file 'src/ConfigPagesContextBase.php' patching file 'src/ConfigPagesContextManager.php' patching file 'src/ConfigPagesForm.php' patching file 'src/ConfigPagesListBuilder.php' patching file 'src/ConfigPagesPermissions.php' patching file 'src/ConfigPagesTypeForm.php' patching file 'src/ConfigPagesTypeListBuilder.php' patching file 'src/Controller/ConfigPagesController.php' patching file 'src/Entity/ConfigPages.php' patching file 'src/Entity/ConfigPagesType.php' patching file 'src/Form/ConfigPagesClearConfirmationForm.php' patching file 'src/Plugin/Block/ConfigPagesBlock.php' patching file 'src/Plugin/Condition/ConfigPagesValueAccess.php' 1 out of 3 hunks failed--saving rejects to 'src/Plugin/Condition/ConfigPagesValueAccess.php.rej' patching file 'tests/src/Functional/ClearConfigPageTest.php' patching file 'tests/src/Functional/DeleteConfigPageTypeTest.php' jetherparadero@PrometSources-MacBook-Pro config_pages % cd .. jetherparadero@PrometSources-MacBook-Pro contrib % phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml config_pages FILE: /Users/jetherparadero/Distributions/drupalorgissues/web/modules/contrib/config_pages/src/Plugin/Condition/ConfigPagesValueAccess.php ------------------------------------------------------------------------------------------------------------------------------------------ FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------------------ 217 | WARNING | Unused variable $cp_type. 217 | WARNING | Unused variable $data_type. ------------------------------------------------------------------------------------------------------------------------------------------ Time: 952ms; Memory: 12MB
Kindly check and advise, please.
Thank you. - ๐ฎ๐ณIndia sakthi_dev
I couldn't find the variables in the file. Could you please reverify it once please?
- Status changed to Needs review
9 months ago 7:33am 27 March 2024 - ๐ฎ๐ณIndia chandansha
I checked module i could not find any phpcs issue.
below share image kindly check.
@all Thanks for Review. - Status changed to Needs work
8 months ago 10:31am 18 April 2024 - ๐ต๐ญPhilippines clarkssquared
Hi
I apply the updated MR !36 into the module and it applied successfully, but when I try to execute the PHPCS command, I can also see the same phpcs issue that comment #9
โ config_pages git:(master) โ curl https://git.drupalcode.org/project/config_pages/-/merge_requests/36.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 29496 0 29496 0 0 28574 0 --:--:-- 0:00:01 --:--:-- 28917 patching file config_pages.module patching file 'src/Command/GetValueCommand.php' patching file 'src/Command/SetValueCommand.php' patching file 'src/ConfigPagesAccessControlHandler.php' patching file 'src/ConfigPagesContextBase.php' patching file 'src/ConfigPagesContextManager.php' patching file 'src/ConfigPagesForm.php' patching file 'src/ConfigPagesListBuilder.php' patching file 'src/ConfigPagesPermissions.php' patching file 'src/ConfigPagesTypeForm.php' patching file 'src/ConfigPagesTypeListBuilder.php' patching file 'src/Controller/ConfigPagesController.php' patching file 'src/Entity/ConfigPages.php' patching file 'src/Entity/ConfigPagesType.php' patching file 'src/Form/ConfigPagesClearConfirmationForm.php' patching file 'src/Plugin/Block/ConfigPagesBlock.php' patching file 'src/Plugin/Condition/ConfigPagesValueAccess.php' 1 out of 3 hunks failed--saving rejects to 'src/Plugin/Condition/ConfigPagesValueAccess.php.rej' patching file 'tests/src/Functional/ClearConfigPageTest.php' patching file 'tests/src/Functional/DeleteConfigPageTypeTest.php' โ config_pages git:(master) โ .. โ contrib git:(master) โ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml ERROR: You must supply at least one file or directory to process. Run "phpcs --help" for usage information โ contrib git:(master) โ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml config_pages FILE: ...rojects/d9/d9-local/web/modules/contrib/config_pages/config_pages.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: ...dules/contrib/config_pages/src/Plugin/Condition/ConfigPagesValueAccess.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE -------------------------------------------------------------------------------- 217 | WARNING | Unused variable $cp_type. 217 | WARNING | Unused variable $data_type. -------------------------------------------------------------------------------- Time: 872ms; Memory: 12MB โ contrib git:(master) โ
- ๐ฎ๐ณIndia mohd sahzad
Mohd Sahzad โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia mohd sahzad
Mohd Sahzad โ changed the visibility of the branch 3424331-fix-phpcs to hidden.
- ๐ฎ๐ณIndia dev16.addweb
silvi.addweb โ made their first commit to this issueโs fork.
- last update
7 months ago 7 pass - Status changed to Needs review
7 months ago 12:18pm 11 June 2024 - ๐ฎ๐ณIndia dev16.addweb
Hi, I have fixed below remaining phpcs issue. Please review.
modules/custom/config_pages FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/config_pages/src/ConfigPagesForm.php --------------------------------------------------------------------------------------------------------------------------- FOUND 9 ERRORS AFFECTING 9 LINES --------------------------------------------------------------------------------------------------------------------------- 91 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket 92 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 93 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 94 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 95 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 96 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 97 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 98 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 99 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 --------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------------------------------- FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/config_pages/src/Controller/ConfigPagesController.php -------------------------------------------------------------------------------------------------------------------------------------------- FOUND 6 ERRORS AFFECTING 5 LINES -------------------------------------------------------------------------------------------------------------------------------------------- 83 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket 84 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 85 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 86 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 87 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 87 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line -------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 6 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------------------------------------------------------------- FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/config_pages/src/Plugin/Block/ConfigPagesBlock.php ----------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------------------------------------------------------------- 47 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line ----------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------------------------------------------------------- FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/config_pages/src/ConfigPagesTypeForm.php ------------------------------------------------------------------------------------------------------------------------------- FOUND 5 ERRORS AFFECTING 4 LINES ------------------------------------------------------------------------------------------------------------------------------- 65 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket 66 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 67 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 68 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 68 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line ------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 5 MARKED SNIFF VIOLATIONS AUTOMATICALLY ------------------------------------------------------------------------------------------------------------------------------- FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/config_pages/src/ConfigPagesListBuilder.php ---------------------------------------------------------------------------------------------------------------------------------- FOUND 9 ERRORS AFFECTING 7 LINES ---------------------------------------------------------------------------------------------------------------------------------- 46 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket 47 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 40 47 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line 61 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket 62 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 63 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 64 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 65 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 65 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line ---------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 9 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------------------------------------------------------------- FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/config_pages/src/ConfigPagesTypeListBuilder.php -------------------------------------------------------------------------------------------------------------------------------------- FOUND 4 ERRORS AFFECTING 3 LINES -------------------------------------------------------------------------------------------------------------------------------------- 39 | ERROR | [x] The first parameter of a multi-line function declaration must be on the line after the opening bracket 40 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 41 | ERROR | [x] Multi-line function declaration not indented correctly; expected 4 spaces but found 30 41 | ERROR | [x] The closing parenthesis of a multi-line function declaration must be on a new line -------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------------------------------------------------------------- Time: 667ms; Memory: 12MB
- Status changed to Needs work
6 months ago 11:14am 22 June 2024 - ๐ฎ๐ณIndia akashpj
Hi, Iโve reviwed MR 36 on Drupal 10.2.x.
The MR applied cleanly.Few phpcs issues fixed but I still can see the below issues
./vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml modules/contrib/config_pages FILE: /Users/apj/projects/doc102/drupal/modules/contrib/config_pages/config_pages.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/apj/projects/doc102/drupal/modules/contrib/config_pages/src/Plugin/Condition/ConfigPagesValueAccess.php ---------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 1 LINE ---------------------------------------------------------------------------------------------------------------------------------- 217 | WARNING | Unused variable $cp_type. 217 | WARNING | Unused variable $data_type. ----------------------------------------------------------------------------------------------------------------------------------
Changing the status back to "Needs work".
Thanks
- Status changed to Needs review
5 months ago 7:23am 16 July 2024 - ๐ฎ๐ณIndia dev16.addweb
Hi,
After applying the MR, I have not found any issues in theConfigPagesValueAccess.php
file.Here is the command I used to run PHP CodeSniffer:
addweb@addweb-HP-ZBook-15-G2:~$ .config/composer/vendor/squizlabs/php_codesniffer/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css,js Drupal8-vagrant/web/web/contribution/lando-d10/web/modules/custom/config_pages/ addweb@addweb-HP-ZBook-15-G2:~$
To avoid issues with the info file, please download the module through:
git clone repo-url
Move to "Need review" so other users can review as well.