- Issue created by @VladimirAus
- Status changed to Needs work
almost 2 years ago 6:26am 22 February 2023 - First commit to issue fork.
- First commit to issue fork.
- ๐ฎ๐ณIndia annmarysruthy
Made commit to fix some more issues in phpcs. However 1 warning is remaining which cannot be solved.
FILE: /var/www/html/web/modules/contrib/weight-3343609/weight.views.inc
-----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------
17 | WARNING | Unused variable $table_name.
-----------------------------------------------------------------------we cannot remove the $table_name variable from the foreach loop because it is used as a key in the $data array. Removing it would cause an error in the loop, as it would not be possible to access the data in the $data array without the key.
- Status changed to Needs review
almost 2 years ago 12:12pm 23 February 2023 - Status changed to Needs work
almost 2 years ago 5:10am 27 February 2023 - ๐ฆ๐บAustralia VladimirAus Brisbane, Australia
Thanks for commit. phpcs return other errors
FILE: /Users/tesboss/_PROJECTS/drupal/weight/weight.module ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- 153 | WARNING | Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for | | xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates." 192 | WARNING | Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for | | xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates." ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- FILE: /Users/tesboss/_PROJECTS/drupal/weight/weight.install ---------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ---------------------------------------------------------------------- 78 | ERROR | Doc comment is empty ---------------------------------------------------------------------- FILE: /Users/tesboss/_PROJECTS/drupal/weight/views/views_handler_weight_selector.inc ------------------------------------------------------------------------------------------------------------------- FOUND 14 ERRORS AND 2 WARNINGS AFFECTING 14 LINES ------------------------------------------------------------------------------------------------------------------- 3 | ERROR | Doc comment is empty 6 | ERROR | Class name must begin with a capital letter 6 | ERROR | Class name must use UpperCamel naming without underscores 6 | WARNING | Class name must be prefixed with the project name "Weight" 8 | ERROR | Doc comment is empty 17 | ERROR | Doc comment is empty 20 | ERROR | Public method name "views_handler_weight_selector::option_definition" is not in lowerCamel format 30 | ERROR | Doc comment is empty 33 | ERROR | Public method name "views_handler_weight_selector::options_form" is not in lowerCamel format 47 | ERROR | Doc comment is empty 54 | ERROR | Doc comment is empty 61 | ERROR | Doc comment is empty 64 | ERROR | Public method name "views_handler_weight_selector::views_form" is not in lowerCamel format 91 | WARNING | Line exceeds 80 characters; contains 83 characters 123 | ERROR | Doc comment is empty 126 | ERROR | Public method name "views_handler_weight_selector::views_form_submit" is not in lowerCamel format -------------------------------------------------------------------------------------------------------------------
- ๐บ๐ธUnited States nmorin Huntsville, AL
Getting Error when attempting to update weight module... Is this related to the errors in the previous comments?
PHP Parse error: syntax error, unexpected '?', expecting ')' in /var/www/drupalbase/sites/all/modules/weight/weight.install on line 39 Drush command terminated abnormally due to an unrecoverable error. [error] Error: syntax error, unexpected '?', expecting ')' in /var/www/drupalbase/sites/all/modules/weight/weight.install, line 39
- ๐บ๐ธUnited States dhigby
I got the same "unexpected '?'" error, reported here: https://www.drupal.org/project/weight/issues/3344820 ๐ Apache 500 error with 7.x-3.2 Needs review
- ๐ฆ๐บAustralia VladimirAus Brisbane, Australia
Patch was pushed for testing for ๐ Apache 500 error with 7.x-3.2 Needs review .
Please test. - First commit to issue fork.
- First commit to issue fork.
- ๐ฎ๐ณIndia zkhan.aamir
Hi,
MR #15 applied successfully.
Admin@DESKTOP-252TO6V MINGW64 ~/Desktop/projects/drupal/web/modules/contrib/weight (7.x-3.x) $ curl https://git.drupalcode.org/project/weight/-/merge_requests/10.diff | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 16773 0 16773 0 0 17530 0 --:--:-- --:--:-- --:--:-- 17544 patching file .gitlab-ci.yml patching file README.md (renamed from README.txt) patching file views/views_handler_weight_selector.inc patching file views/weight.views.inc patching file weight.install patching file weight.module
Remaining issues
Admin@DESKTOP-252TO6V MINGW64 ~/Desktop/projects/drupal/web/modules/contrib $ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,js,yml weight/ FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\weight\views\views_handler_weight_selector.inc ------------------------------------------------------------------------------------------------------------------- FOUND 6 ERRORS AND 1 WARNING AFFECTING 5 LINES ------------------------------------------------------------------------------------------------------------------- 6 | ERROR | Class name must begin with a capital letter 6 | ERROR | Class name must use UpperCamel naming without underscores 6 | WARNING | Class name must be prefixed with the project name "Weight" 28 | ERROR | Public method name "views_handler_weight_selector::option_definition" is not in lowerCamel format 46 | ERROR | Public method name "views_handler_weight_selector::options_form" is not in lowerCamel format 91 | ERROR | Public method name "views_handler_weight_selector::views_form" is not in lowerCamel format 158 | ERROR | Public method name "views_handler_weight_selector::views_form_submit" is not in lowerCamel format ------------------------------------------------------------------------------------------------------------------- FILE: C:\Users\Admin\Desktop\projects\drupal\web\modules\contrib\weight\weight.module ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 153 | WARNING | Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for | | xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates." 192 | WARNING | Format should be "* Implements hook_foo().", "* Implements hook_foo_BAR_ID_bar() for xyz_bar().",, "* Implements hook_foo_BAR_ID_bar() for | | xyz-bar.html.twig.", "* Implements hook_foo_BAR_ID_bar() for xyz-bar.tpl.php.", or "* Implements hook_foo_BAR_ID_bar() for block templates." ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Time: 357ms; Memory: 10MB
- First commit to issue fork.
- ๐ฎ๐ณIndia Yashaswi18
Hello, after checking out to the branch '3343609-7.x-phpcs-coding', found these errors remaining :
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,js,yml weight/
FILE: /home/yashaswi/contribs/weight/views/views_handler_weight_selector.inc
-------------------------------------------------------------------------------------------------------------------
FOUND 6 ERRORS AND 1 WARNING AFFECTING 5 LINES
-------------------------------------------------------------------------------------------------------------------
6 | ERROR | Class name must begin with a capital letter
6 | ERROR | Class name must use UpperCamel naming without underscores
6 | WARNING | Class name must be prefixed with the project name "Weight"
28 | ERROR | Public method name "views_handler_weight_selector::option_definition" is not in lowerCamel format
46 | ERROR | Public method name "views_handler_weight_selector::options_form" is not in lowerCamel format
91 | ERROR | Public method name "views_handler_weight_selector::views_form" is not in lowerCamel format
158 | ERROR | Public method name "views_handler_weight_selector::views_form_submit" is not in lowerCamel format
------------------------------------------------------------------------------------------------------------------- - First commit to issue fork.
- Status changed to Needs review
9 months ago 9:21am 22 March 2024 - Status changed to Needs work
5 months ago 4:13pm 30 July 2024 - ๐ต๐ญPhilippines roberttabigue
Hi @avpaderno,
After reviewing and applied the MR!10 to the Weight module against 7.x-3.x-dev on Drupal 10, I still see 1 PHPCS warning.
See below:FILE: /Users/roberttabigue/Project/DrupalOrg/drupalorgissues/web/modules/contrib/weight/views/views_handler_weight_selector.inc ------------------------------------------------------------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ------------------------------------------------------------------------------------------------------------------------------- 8 | WARNING | Class name must be prefixed with the project name "Weight" -------------------------------------------------------------------------------------------------------------------------------
I ran this command on the module:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md,yml,css,js weight/
I'm moving this to โNeeds workโ for now.
Thank you!
- Status changed to Needs review
5 months ago 6:20am 31 July 2024 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
GitLab CI does not report any PHP_CodeSniffer error/warning.
phpcs --standard=Drupal,DrupalPractice
does not applies the same PHP_CodeSniffer rules GitLab CI applies, which means it can give different errors/warnings, but that is irrelevant, since GitLab CI is used to test the project. - Status changed to RTBC
5 months ago 2:28pm 5 August 2024 - ๐ฉ๐ชGermany Anybody Porta Westfalica
Here's the fix for modern Drupal: ๐ Fix phpcs, cspell and phpunit Active could both be merged perhaps?
- ๐ฆ๐บAustralia VladimirAus Brisbane, Australia
vladimiraus โ changed the visibility of the branch 8.x-3.x to hidden.
-
vladimiraus โ
committed a2d5ad0a on 7.x-3.x
Issue #3343609 by vladimiraus, annmarysruthy, _pratik_: Fix the issues...
-
vladimiraus โ
committed a2d5ad0a on 7.x-3.x
- ๐ฆ๐บAustralia VladimirAus Brisbane, Australia
Thanks, everyone! ๐ง
Committed! Automatically closed - issue fixed for 2 weeks with no activity.