- Issue created by @bhaveshdas
- Status changed to Needs review
8 months ago 10:05am 28 March 2024 - Status changed to Needs work
8 months ago 10:11am 29 March 2024 - ๐ฎ๐ณIndia amanbtr72
Added twig extension to command and got this error
phpcbf --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,css,theme,info,txt,md,yml,twig modules/custom/doissues/seeds_layouts-3436337/ PHPCBF RESULT SUMMARY ------------------------------------------------------------------------------------------------------------------------ FILE FIXED REMAINING ------------------------------------------------------------------------------------------------------------------------ D:\wamp64\www\drupal10\modules\custom\doissues\seeds_layouts-3436337\templates\seeds-2col.html.twig 1 0 ------------------------------------------------------------------------------------------------------------------------ A TOTAL OF 1 ERROR WERE FIXED IN 1 FILE ------------------------------------------------------------------------------------------------------------------------ Time: 1.97 secs; Memory: 14MB
- Status changed to Needs review
8 months ago 10:14am 29 March 2024 - Status changed to Needs work
8 months ago 3:33pm 29 March 2024 - ๐ต๐ญPhilippines clarkssquared
Hi
I applied MR !2 and there are still PHPCS issues that needs to be resolved.
โ seeds_layouts git:(master) โ curl https://git.drupalcode.org/project/seeds_layouts/-/merge_requests/2.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 40643 0 40643 0 0 76147 0 --:--:-- --:--:-- --:--:-- 76975 patching file 'assets/images/seeds_1col.svg' Patch creates file that already exists! Assume -R? [y] y patching file 'assets/images/seeds_2col.svg' Patch creates file that already exists! Assume -R? [y] y patching file 'assets/images/seeds_3col.svg' Patch creates file that already exists! Assume -R? [y] y patching file seeds_3col.svg Patch creates file that already exists! Assume -R? [y] patching file seeds_layouts.info.yml 1 out of 1 hunks failed--saving rejects to seeds_layouts.info.yml.rej patching file seeds_layouts.install Reversed (or previously applied) patch detected! Assume -R? [y] y patching file seeds_layouts.layouts.yml Reversed (or previously applied) patch detected! Assume -R? [y] patching file seeds_layouts.libraries.yml Reversed (or previously applied) patch detected! Assume -R? [y] patching file seeds_layouts.module patching file 'src/Element/BlocksWrapper.php' patching file 'src/Form/ColumnsForm.php' patching file 'src/Form/FrameworkImportForm.php' patching file 'src/Form/SeedsLayoutsConfigForm.php' patching file 'src/Plugin/LayoutField/BackgroundImageField.php' patching file 'src/Plugin/LayoutField/CheckboxField.php' patching file 'src/Plugin/LayoutField/HideField.php' patching file 'src/Plugin/LayoutField/SelectField.php' patching file 'src/Plugin/LayoutField/WrapBlocksField.php' patching file 'src/Plugin/LayoutField/WrapField.php' patching file 'src/Plugin/LayoutFieldBase.php' patching file 'src/Plugin/LayoutFieldInterface.php' patching file 'src/Plugin/SeedsLayout.php' Reversed (or previously applied) patch detected! Assume -R? [y] 4 out of 8 hunks failed--saving rejects to 'src/Plugin/SeedsLayout.php.rej' patching file 'src/SeedsLayoutsManager.php' 2 out of 3 hunks failed--saving rejects to 'src/SeedsLayoutsManager.php.rej' patching file 'templates/seeds-2col.html.twig' โ seeds_layouts git:(master) โ .. โ contrib git:(master) โ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml seeds_layouts FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/seeds_layouts/seeds_layouts.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/seeds_layouts/seeds_layouts.module ------------------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------------- 94 | ERROR | The array declaration extends to column 93 (the limit is 80). The array content should be split up over multiple lines ------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/seeds_layouts/src/Plugin/SeedsLayout.php ---------------------------------------------------------------------------------------------------------------------------------------------- FOUND 5 ERRORS AND 3 WARNINGS AFFECTING 7 LINES ---------------------------------------------------------------------------------------------------------------------------------------------- 75 | ERROR | [ ] Doc comment short description must start with a capital letter 127 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, question marks, colons, or closing parentheses 132 | ERROR | [ ] The array declaration extends to column 111 (the limit is 80). The array content should be split up over multiple lines 211 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 211 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 220 | WARNING | [ ] t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead 288 | ERROR | [ ] The array declaration extends to column 159 (the limit is 80). The array content should be split up over multiple lines 290 | ERROR | [ ] The array declaration extends to column 110 (the limit is 80). The array content should be split up over multiple lines ---------------------------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ---------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/clarksubing-subing/Projects/d9/d9-local/web/modules/contrib/seeds_layouts/src/SeedsLayoutsManager.php ------------------------------------------------------------------------------------------------------------------ FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES ------------------------------------------------------------------------------------------------------------------ 50 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead 175 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead ------------------------------------------------------------------------------------------------------------------ Time: 677ms; Memory: 12MB โ contrib git:(master) โ
- Status changed to Needs review
8 months ago 6:02am 1 April 2024 - ๐ฎ๐ณIndia bhaveshdas
Hello @clarkssquared ,
Might be you check in master branch that why its showing all issues.kindly review on this branch 3436337-fix-the-issues not in master branch
please check below screenshot added for reference
Thankyou !!
- ๐ฎ๐ณIndia dev16.addweb
silvi.addweb โ made their first commit to this issueโs fork.
- ๐ฎ๐ณIndia dev16.addweb
Hi, I have fix below remaining phpcs issues. Please review
custom/masqurade_log/seeds_layouts/ FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/seeds_layouts/src/Plugin/LayoutField/BackgroundImageField.php ------------------------------------------------------------------------------------------------------------------------------------------------------------------ FOUND 2 ERRORS AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------------------------------------------ 42 | ERROR | Function return type is not void, but function has no return statement 42 | ERROR | Description for the @return value is missing ------------------------------------------------------------------------------------------------------------------------------------------------------------------ Time: 447ms; Memory: 12MB
- ๐ต๐ญPhilippines clarkssquared
Hi
I applied the updated MR !2 but it seems its not applying properly?
โ seeds_layouts git:(main) โ curl https://git.drupalcode.org/project/seeds_layouts/-/merge_requests/2.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 40936 0 40936 0 0 80131 0 --:--:-- --:--:-- --:--:-- 81222 patching file 'assets/images/seeds_1col.svg' Patch creates file that already exists! Assume -R? [y] y patching file 'assets/images/seeds_2col.svg' Patch creates file that already exists! Assume -R? [y] y patching file 'assets/images/seeds_3col.svg' Patch creates file that already exists! Assume -R? [y] y patching file seeds_3col.svg Patch creates file that already exists! Assume -R? [y] y patching file seeds_layouts.info.yml 1 out of 1 hunks failed--saving rejects to seeds_layouts.info.yml.rej patching file seeds_layouts.install Reversed (or previously applied) patch detected! Assume -R? [y] y patching file seeds_layouts.layouts.yml Reversed (or previously applied) patch detected! Assume -R? [y] y patching file seeds_layouts.libraries.yml Reversed (or previously applied) patch detected! Assume -R? [y] y patching file seeds_layouts.module patching file 'src/Element/BlocksWrapper.php' patching file 'src/Form/ColumnsForm.php' patching file 'src/Form/FrameworkImportForm.php' patching file 'src/Form/SeedsLayoutsConfigForm.php' patching file 'src/Plugin/LayoutField/BackgroundImageField.php' patching file 'src/Plugin/LayoutField/CheckboxField.php' patching file 'src/Plugin/LayoutField/HideField.php' patching file 'src/Plugin/LayoutField/SelectField.php' patching file 'src/Plugin/LayoutField/WrapBlocksField.php' patching file 'src/Plugin/LayoutField/WrapField.php' patching file 'src/Plugin/LayoutFieldBase.php' patching file 'src/Plugin/LayoutFieldInterface.php' patching file 'src/Plugin/SeedsLayout.php' Reversed (or previously applied) patch detected! Assume -R? [y] y 4 out of 8 hunks failed--saving rejects to 'src/Plugin/SeedsLayout.php.rej' patching file 'src/SeedsLayoutsManager.php' 2 out of 3 hunks failed--saving rejects to 'src/SeedsLayoutsManager.php.rej' patching file 'templates/seeds-2col.html.twig' โ seeds_layouts git:(main) โ .. โ contrib git:(main) โ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml seeds_layouts FILE: .../d10/drupal_local/web/modules/contrib/seeds_layouts/seeds_layouts.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: ...ts/d10/drupal_local/web/modules/contrib/seeds_layouts/seeds_layouts.module -------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE -------------------------------------------------------------------------------- 94 | ERROR | The array declaration extends to column 93 (the limit is 80). The | | array content should be split up over multiple lines -------------------------------------------------------------------------------- FILE: .../drupal_local/web/modules/contrib/seeds_layouts/src/Plugin/SeedsLayout.php -------------------------------------------------------------------------------- FOUND 5 ERRORS AND 3 WARNINGS AFFECTING 7 LINES -------------------------------------------------------------------------------- 75 | ERROR | [ ] Doc comment short description must start with a capital | | letter 127 | ERROR | [x] Inline comments must end in full-stops, exclamation marks, | | question marks, colons, or closing parentheses 132 | ERROR | [ ] The array declaration extends to column 111 (the limit is | | 80). The array content should be split up over multiple | | lines 211 | WARNING | [ ] t() calls should be avoided in classes, use | | \Drupal\Core\StringTranslation\StringTranslationTrait and | | $this->t() instead 211 | WARNING | [ ] t() calls should be avoided in classes, use | | \Drupal\Core\StringTranslation\StringTranslationTrait and | | $this->t() instead 220 | WARNING | [ ] t() calls should be avoided in classes, use | | \Drupal\Core\StringTranslation\StringTranslationTrait and | | $this->t() instead 288 | ERROR | [ ] The array declaration extends to column 159 (the limit is | | 80). The array content should be split up over multiple | | lines 290 | ERROR | [ ] The array declaration extends to column 110 (the limit is | | 80). The array content should be split up over multiple | | lines -------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY -------------------------------------------------------------------------------- FILE: ...drupal_local/web/modules/contrib/seeds_layouts/src/SeedsLayoutsManager.php -------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES -------------------------------------------------------------------------------- 50 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead 175 | WARNING | \Drupal calls should be avoided in classes, use dependency | | injection instead -------------------------------------------------------------------------------- Time: 587ms; Memory: 12MB โ contrib git:(main) โ
retaining the status to needs review for others if they can replicate my report.