- Issue created by @arpitk
- Issue was unassigned.
- Status changed to Needs work
over 1 year ago 8:19pm 18 May 2023 - Status changed to Needs review
over 1 year ago 8:20am 19 May 2023 - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - First commit to issue fork.
- Status changed to Needs work
over 1 year ago 9:24am 19 May 2023 - ๐ฎ๐ณIndia dineshkumarbollu
Hi
After applied the patch i run the phpcs command it shows some errors
vendor/bin/phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig web/modules/contrib/session_limit-3361326/
FILE: /var/www/html/vbd9/web/modules/contrib/session_limit-3361326/src/Services/SessionLimit.php
-------------------------------------------------------------------------------------------------------------------
FOUND 3 ERRORS AND 1 WARNING AFFECTING 4 LINES
-------------------------------------------------------------------------------------------------------------------
251 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
308 | ERROR | Protected method name "SessionLimit::_onSessionCollision__Ask" is not in lowerCamel format
324 | ERROR | Protected method name "SessionLimit::_onSessionCollision__PreventNew" is not in lowerCamel format
341 | ERROR | Protected method name "SessionLimit::_onSessionCollision__DropOldest" is not in lowerCamel format
-------------------------------------------------------------------------------------------------------------------FILE: /var/www/html/vbd9/web/modules/contrib/session_limit-3361326/src/Form/SessionLimitForm.php
------------------------------------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
------------------------------------------------------------------------------------------------
135 | ERROR | Doc comment is empty
------------------------------------------------------------------------------------------------FILE: /var/www/html/vbd9/web/modules/contrib/session_limit-3361326/src/Form/SettingsForm.php
-----------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-----------------------------------------------------------------------------------------------------------------
16 | WARNING | The class short comment should describe what the class does and not simply repeat the class name
-----------------------------------------------------------------------------------------------------------------FILE: /var/www/html/vbd9/web/modules/contrib/session_limit-3361326/src/Event/SessionLimitCollisionEvent.php
-----------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
-----------------------------------------------------------------------------------------------------------
8 | ERROR | Doc comment is empty
13 | ERROR | Missing short description in doc comment
18 | ERROR | Missing short description in doc comment
23 | ERROR | Missing short description in doc comment
28 | ERROR | Missing short description in doc comment
-----------------------------------------------------------------------------------------------------------FILE: /var/www/html/vbd9/web/modules/contrib/session_limit-3361326/src/Event/SessionLimitDisconnectEvent.php
------------------------------------------------------------------------------------------------------------
FOUND 5 ERRORS AFFECTING 5 LINES
------------------------------------------------------------------------------------------------------------
7 | ERROR | Doc comment is empty
12 | ERROR | Missing short description in doc comment
17 | ERROR | Missing short description in doc comment
22 | ERROR | Missing short description in doc comment
27 | ERROR | Missing short description in doc comment
------------------------------------------------------------------------------------------------------------Time: 1.97 secs; Memory: 16MB
thanks,
- ๐ฎ๐ณIndia arpitk
Hi @dineshkumarbollu I have mentioned in the remaining task in the issue summary these need to fixed. that's why i kept the status to need work.
Thanks!
- ๐ฎ๐ณIndia dineshkumarbollu
Hi
Someone cahnged the status to reviewed that's why i test the module.
Thanks
- Status changed to Needs review
over 1 year ago 12:03pm 19 May 2023 - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - ๐ฎ๐ณIndia sakthi_dev
Created a patch along with the remaining issues. Please review.
- Status changed to Needs work
over 1 year ago 1:22pm 19 May 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
/** + * The bypass. + * * @var bool */
That description is repeating the property name.
/** + * Implements shouldBypass() + *
Method descriptions must not start with Implements/Implement nor repeat the method name.
+/** + * Implements Session limit collision event. + */
Class descriptions must not start with Implements/Implement nor repeat the class name.
/** + * The useractivesessions value. + * * @var int */ protected $userActiveSessions;
The description is repeating the property name without saying what is its purpose.
* @param int $sessionId
- * @param AccountInterface $account
+ * The sessionId.
+ * @param \Drupal\Core\Session\AccountInterface $account
+ * The account.
* @param int $userActiveSessions
+ * The userActiveSessions.
* @param int $userMaxSessions
+ * The userMaxSessions.All those descriptions are repeating the parameter name.
/** + * Implements getSessionId(). + * * @return int + * Returns int. */ public function getSessionId() {
The return value description must not start with Returns/Return nor repeat the return value type, which is already given in the previous line.
+ /** + * The current user. + * + * @var \Drupal\session_limit\Services\SessionLimit + */ + protected $sessionLimit;
The description is not for that property.
+ /** + * Constructs a new SessionLimitForm object. + * + * @param \Drupal\Core\Session\AccountInterface $current_user + * The current user instance. + * @param \Drupal\session_limit\Services\SessionLimit $session_limit + * The current user instance. + * @param \Drupal\Core\Session\SessionManagerInterface $session_manager + * The session manager service. + * @param \Drupal\Core\Datetime\DateFormatter $dateFormatter + * The date formatter. + */
The class name is missing its namespace.
There is no need to say instance in the parameter description.
The same description is given for two different parameters. - Assigned to nitin_lama
- Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - Issue was unassigned.
- Status changed to Needs review
over 1 year ago 1:01pm 8 June 2023 - Status changed to Needs work
over 1 year ago 1:37pm 8 June 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
+ * Constructs a new \Drupal\session_limit\Event\SessionLimitCollisionEvent + * constructor. *
A constructor constructs a new object, not a new constructor.
The description must be in a single line.- * @param AccountInterface $account + * The sessionId.
It should be The session ID.
* @param int $userActiveSessions + * The user active session ID.
* @param int $userMaxSessions + * The maximum user session.
Given the parameter names, those descriptions are not correct.
+ * Get session ID.
A definite article is missing before session.
The verb needs to be declined on the third person singular. - Assigned to nitin_lama
- Issue was unassigned.
- Status changed to Needs review
over 1 year ago 10:27am 9 June 2023 - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - Status changed to Needs work
10 months ago 11:25pm 21 January 2024 - ๐ท๐บRussia zniki.ru
Thanks for patch, here is feedback for patch #16.
Please remove all the t() methods from Test files. And check my comments below.-
+++ b/tests/session_limit.test @@ -66,17 +73,17 @@ class SessionLimitBaseTestCase extends DrupalWebTestCase { + $this->assertText($this->t('Log out'), $this->t('User is logged in under session @no.', ['@no' => $session_number]));
no need for t() method here, use string and sprintf.
-
+++ b/tests/session_limit.test @@ -299,18 +306,18 @@ class SessionLimitBaseTestCase extends DrupalWebTestCase { - * getInfo() returns properties that are displayed in the test selection form. + * GetInfo() returns properties that are displayed in the test selection form.
getInfo and GetInfo is 2 different methods. I would not make this change.
-
+++ b/tests/session_limit.test @@ -427,29 +435,24 @@ class SessionLimitLogoutTestCase extends SessionLimitBaseTestCase { + // $roles = $this->sessionLimitMakeRoles($user);
Why this line is going to be removed?
-
+++ b/tests/session_limit.test @@ -427,29 +435,24 @@ class SessionLimitLogoutTestCase extends SessionLimitBaseTestCase { + // // @FIXME
Let's add phpcs:disable
There are a lot of changes, let's switch to MR workflow, to simplify review.
-
- Assigned to nitin_lama
- ๐ฎ๐ณIndia nitin_lama India
Addressing #18.1 #18.2
Providing updated patch. - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
10 months ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
10 months ago Waiting for branch to pass - Issue was unassigned.
- Status changed to Needs review
10 months ago 4:10pm 22 January 2024 - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
10 months ago Waiting for branch to pass - Status changed to Needs work
10 months ago 4:26pm 22 January 2024 - ๐ฎ๐ณIndia mohd sahzad
Mohd Sahzad โ made their first commit to this issueโs fork.
- Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
10 months ago Waiting for branch to pass - Status changed to Needs review
10 months ago 12:35pm 23 January 2024 - Status changed to Needs work
10 months ago 2:13pm 23 January 2024 - First commit to issue fork.
- Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
10 months ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
9 months ago Waiting for branch to pass - First commit to issue fork.
- Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
9 months ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
9 months ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
9 months ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
9 months ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
9 months ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
9 months ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
9 months ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
9 months ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
9 months ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
9 months ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
9 months ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
9 months ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
9 months ago Waiting for branch to pass - Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
9 months ago Waiting for branch to pass - Status changed to Needs review
9 months ago 4:21pm 4 March 2024 - ๐ฌ๐งUnited Kingdom welly
Right, I think this is ready to be looked at. There were some additional changes that needed making. Would be keen on any feedback on the changes made (this included enabling gitlab-ci for the module and then making updates to pass phpstan tests)
- Status changed to Needs work
7 months ago 2:49pm 8 May 2024 - Status changed to Needs review
6 months ago 1:49pm 13 May 2024 - ๐ฆ๐บAustralia VladimirAus Brisbane, Australia
PHPStan has only one issue and it depends on the other module.
- Status changed to Needs work
6 months ago 3:28am 14 May 2024 - ๐ฆ๐บAustralia jannakha Brisbane!
PHPCS reports this: DI is required on this line:
https://git.drupalcode.org/issue/session_limit-3361326/-/blob/3361326-fi... - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
- Status changed to Needs review
6 months ago 2:35am 21 May 2024 - ๐จ๐ฆCanada ambient.impact Toronto
VladimirAus โ credited Ambient.Impact โ .
- ๐ฆ๐บAustralia VladimirAus Brisbane, Australia
Added credits for ๐ Services\SessionLimit should type-hint dependencies using interfaces Needs review .
- Status changed to RTBC
6 months ago 5:45am 21 May 2024 -
VladimirAus โ
committed 6ace3bc2 on 2.0.x authored by
nitin_lama โ
Issue #3361326 by VladimirAus, welly, nitin_lama, apaderno, arpitk,...
-
VladimirAus โ
committed 6ace3bc2 on 2.0.x authored by
nitin_lama โ
- Status changed to Fixed
6 months ago 11:34am 21 May 2024 - ๐ฆ๐บAustralia VladimirAus Brisbane, Australia
Committed and released! ๐ป
Thanks everyone! Automatically closed - issue fixed for 2 weeks with no activity.