- Issue created by @arunkumark
- Status changed to Needs review
almost 2 years ago 8:30am 8 February 2023 - š®š³India Adil_Siddiqui
Patch created and fixed above Drupal coding standard issues.
The phpcd command given below is used which give issues according to drupal standard:
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml force_users_logout - First commit to issue fork.
- š®š³India nayana_mvr
Verified the patch #2 and tested it on Drupal version 10.1.x and Force Users Logout 2.0.x. The patch applied cleanly and all the errors mentioned in the ticket are fixed after applying the patch.
- š®š³India noorulshameera
Patch #2 applied cleanly.
However found one more issue while running
vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml web/modules/contrib/force_users_logoutFILE: /Applications/MAMP/htdocs/d9/web/modules/contrib/force_users_logout/force_users_logout.module
---------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
---------------------------------------------------------------------------------------------------
36 | ERROR | [x] Expected 1 newline at end of file; 0 found
---------------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------------so adding a patch which fixes issues including above one as well.
- Status changed to RTBC
almost 2 years ago 6:21am 23 February 2023 - š®š³India Akram Khan Cuttack, Odisha
Checked patch #5 it applied successfully and it remove all PHPCS issue so move to RTBC
- First commit to issue fork.
- Status changed to Needs work
almost 2 years ago 10:07am 24 February 2023 - š®š¹Italy apaderno Brescia, š®š¹
The issue summary should always describe what the issue is trying to fix and, in the case, of coding standards issues, report which command has been used, which arguments have been used, and which report that command shown.
- š®š¹Italy apaderno Brescia, š®š¹
* @param \Drupal\Core\Database\Connection $connection * The database connection. + * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager + * Entity type manager service.
The article at the beginning of the description is missing, as it is missing on a similar description given in another line.
/** * Constructs. * * @param \Drupal\Core\Database\Connection $connection * The database connection. + * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager + * Entity type manager service. */
Since that comment is changed, the first line should be changed too, as constructors are not described as Constructs.
- * Constructs entity type manager service. + * Drupal\Core\Session\AccountProxyInterface definition. * - * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager - * The entity type manager. + * @var \Drupal\Core\Session\AccountProxyInterface
Parameters are not described with
@var
.+ /** + * Class constructor. + */ + public function __construct(EntityTypeManagerInterface $entity_type_manager, AccountProxyInterface $current_user, SessionManager $session_manager) { $this->entityTypeManager = $entity_type_manager; + $this->currentUser = $current_user; + $this->sessionManager = $session_manager; }
A class constructor is not described in that way. The description for the parameter is also missing.
- Status changed to Needs review
almost 2 years ago 4:11pm 14 March 2023 - Status changed to RTBC
almost 2 years ago 6:16am 27 March 2023 - š®š³India TanujJain-TJ
Tested patch #15 on drupal: 10.1.x, the patch applied successfully and removed all the errors reported by phpcs. RTBC
- Status changed to Needs work
almost 2 years ago 7:57am 27 March 2023 - š®š¹Italy apaderno Brescia, š®š¹
+ /** + /** + * Constructs the AutocompleteController object. * * @param \Drupal\Core\Database\Connection $connection * The database connection. + * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager + * The entity type manager. */
The class namespace is missing.
Since the constructor does not just constructs a single instance, the article used is wrong./** - * Constructs entity type manager service. + * Drupal\Core\Session\AccountProxyInterface definition. + * + * @var \Drupal\Core\Session\AccountProxyInterface + */ + protected $currentUser;
Repeating the class name is not how a property is documented.
- Status changed to Needs review
over 1 year ago 7:01pm 19 June 2023 - š®š³India arpitk
- Status changed to Needs work
over 1 year ago 9:02am 20 June 2023 - š®š¹Italy apaderno Brescia, š®š¹
+ * Constructs a new AutocompleteController object.
+ * Constructs a new AllOtherUsersLogoutForm object.
+ * Constructs a new IndividualUserLogoutForm object.
The class namespace is still missing.
- Assigned to nitin_lama
- Status changed to Needs review
over 1 year ago 10:48am 20 June 2023 - Issue was unassigned.
Hi, patch #21 applied cleanly and changes suggested in #19 has been addressed in the patch #21
Thankyou.- š®š³India Yashaswi18
Fixed the remaining Phpcs issues in this patch. Please review.
- š®š³India pray_12
Hi,
Applied patch #24 is applied cleanly and errors are fixed.But line extends characters warning are showing up.FILE: /force_users_logout/src/Controller/AutocompleteController.php ---------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------------- 33 | WARNING | Line exceeds 80 characters; contains 90 characters ---------------------------------------------------------------------------- FILE: /force_users_logout/src/Form/AllOtherUsersLogoutForm.php ---------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------------- 39 | WARNING | Line exceeds 80 characters; contains 85 characters ---------------------------------------------------------------------------- FILE: /force_users_logout/src/Form/RoleBasedLogoutForm.php ---------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------------- 39 | WARNING | Line exceeds 80 characters; contains 81 characters ---------------------------------------------------------------------------- FILE: /force_users_logout/src/Form/IndividualUserLogoutForm.php ---------------------------------------------------------------------------- FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE ---------------------------------------------------------------------------- 40 | WARNING | Line exceeds 80 characters; contains 86 characters ----------------------------------------------------------------------------
- š®š³India dev16.addweb
Hello,
I reviewed all the issues and fixed all the problems reported by phpcs. Please review the attached patch. - Status changed to RTBC
7 months ago 12:18pm 31 May 2024 - šµšPhilippines cleavinjosh
Hi @silvi.addweb,
I applied patch #26. It was applied smoothly and fixed all the issues reported by phpcs.
ā force_users_logout git:(2.0.x) curl https://www.drupal.org/files/issues/2024-05-31/force_users_logout-3340141-26.patch | patch -p1 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 15210 100 15210 0 0 37128 0 --:--:-- --:--:-- --:--:-- 37097 patching file README.md patching file src/Controller/AutocompleteController.php patching file src/Form/AllOtherUsersLogoutForm.php patching file src/Form/IndividualUserLogoutForm.php patching file src/Form/RoleBasedLogoutForm.php ā force_users_logout git:(2.0.x) ā .. ā contrib git:(main) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml force_users_logout ā contrib git:(main) ā
Thank you.
- Status changed to Needs work
7 months ago 3:23pm 31 May 2024 - Status changed to Needs review
7 months ago 3:27pm 31 May 2024 - Status changed to Needs work
7 months ago 12:43pm 7 June 2024 - šµšPhilippines cleavinjosh
Hi @apaderno,
I applied MR!13 and it was applied smoothly.
However, I still encounter some issues after I ran
phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml
.ā force_users_logout git:(2.0.x) curl https://git.drupalcode.org/project/force_users_logout/-/merge_requests/13.diff | git apply -v % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 14951 0 14951 0 0 33067 0 --:--:-- --:--:-- --:--:-- 33150 Checking patch .gitlab-ci.yml... Checking patch src/Controller/AutocompleteController.php... Checking patch src/Form/AllOtherUsersLogoutForm.php... Checking patch src/Form/IndividualUserLogoutForm.php... Checking patch src/Form/RoleBasedLogoutForm.php... Applied patch .gitlab-ci.yml cleanly. Applied patch src/Controller/AutocompleteController.php cleanly. Applied patch src/Form/AllOtherUsersLogoutForm.php cleanly. Applied patch src/Form/IndividualUserLogoutForm.php cleanly. Applied patch src/Form/RoleBasedLogoutForm.php cleanly. ā force_users_logout git:(2.0.x) ā .. ā contrib git:(main) ā phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml force_users_logout FILE: ...nterns/Demo-site/drupal-org-issues/web/modules/contrib/force_users_logout/README.md ----------------------------------------------------------------------------------------- FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES ----------------------------------------------------------------------------------------- 7 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters 10 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters 69 | ERROR | [x] Expected 1 newline at end of file; 0 found ----------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------- FILE: ...issues/web/modules/contrib/force_users_logout/src/Form/IndividualUserLogoutForm.php ----------------------------------------------------------------------------------------- FOUND 1 ERROR AFFECTING 1 LINE ----------------------------------------------------------------------------------------- 7 | ERROR | [x] Use statements should be sorted alphabetically. The first wrong one is | | Drupal\Core\Entity\EntityTypeManagerInterface. ----------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY ----------------------------------------------------------------------------------------- Time: 481ms; Memory: 10MB ā contrib git:(main) ā
Thank you.
- Status changed to Needs review
7 months ago 4:47pm 7 June 2024 - Status changed to Needs work
7 months ago 6:12am 10 June 2024 - š®š³India dev16.addweb
Hi, Need to fix errors/warnings in README.md file
modules/custom/force_users_logout-3340141/ FILE: /home/addweb/Drupal8-vagrant/web/web/contribution/drupal-10-3/web/modules/custom/force_users_logout-3340141/README.md --------------------------------------------------------------------------------------------------------------------------- FOUND 1 ERROR AND 2 WARNINGS AFFECTING 3 LINES --------------------------------------------------------------------------------------------------------------------------- 7 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters 10 | WARNING | [ ] Line exceeds 80 characters; contains 85 characters 69 | ERROR | [x] Expected 1 newline at end of file; 0 found --------------------------------------------------------------------------------------------------------------------------- PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY --------------------------------------------------------------------------------------------------------------------------- Time: 121ms; Memory: 10MB
- Status changed to Needs review
7 months ago 6:14am 10 June 2024 - Status changed to RTBC
7 months ago 12:11pm 13 June 2024 - š®š³India diwakar07
Hi,
I reviewed MR !13.
PHP_CodeSniffer job is passed/green in the Gitlab CI reports.
Looks good to me.Moving to RTBC.
- Status changed to Needs work
7 months ago 6:56pm 13 June 2024