Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

samit.310@gmail.com created an issue. See original summary.

samitk’s picture

Assigned: samitk » Unassigned
Status: Needs work » Needs review
StatusFileSize
new0 bytes

Error/Warnings are fixed.

irfan.gul’s picture

The given patch was empty. So, I have created a new patch. Please review the patch.

sourabhjain’s picture

StatusFileSize
new5.81 KB
new1.87 KB

I have applied the patch #3 and still below issues are showing

sourabhjain@LPT-SOURABH recently_read % phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml .

FILE: /Users/sourabhjain/www/drupal/modules/contrib/recently_read/tests/src/Functional/RecentlyReadBlockTest.php
------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 8 WARNINGS AFFECTING 8 LINES
------------------------------------------------------------------------------------------------------------------------------------------
  77 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  81 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  86 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  90 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  94 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
  98 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 119 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
 123 | WARNING | t() calls should be avoided in classes, use \Drupal\Core\StringTranslation\StringTranslationTrait and $this->t() instead
------------------------------------------------------------------------------------------------------------------------------------------


FILE: /Users/sourabhjain/www/drupal/modules/contrib/recently_read/recently_read.info.yml
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------
 8 | WARNING | All dependencies must be prefixed with the project name, for example "drupal:"
----------------------------------------------------------------------------------------------

So I have fixed it and attaching the patch for that.

akshay.singh’s picture

Assigned: Unassigned » akshay.singh

I will review this.
Thanks

samitk’s picture

StatusFileSize
new6.62 KB

Not sure, how it shown empty patch in #2

Adding the same patch again.

akshay.singh’s picture

Assigned: akshay.singh » Unassigned
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Patch #4 applied cleanly.
And no further issues left.

akshay.singh:/var/www/html/dcontri/recently_read(8.x-1.x)$ git apply -v 3332563-4.patch
Checking patch README.txt...
Checking patch recently_read.info.yml...
Checking patch recently_read.install...
Checking patch src/Form/RecentlyReadTypeForm.php...
Checking patch src/RecentlyReadService.php...
Checking patch src/RecentlyReadServiceInterface.php...
Checking patch tests/src/Functional/RecentlyReadBlockTest.php...
Applied patch README.txt cleanly.
Applied patch recently_read.info.yml cleanly.
Applied patch recently_read.install cleanly.
Applied patch src/Form/RecentlyReadTypeForm.php cleanly.
Applied patch src/RecentlyReadService.php cleanly.
Applied patch src/RecentlyReadServiceInterface.php cleanly.
Applied patch tests/src/Functional/RecentlyReadBlockTest.php cleanly.

Moving to RTBC!

Sonal Gyanani made their first commit to this issue’s fork.

Sonal Gyanani’s picture

Patch #4 working fine, all errors and warnings are fixed.

avpaderno’s picture

Title: Drupal Coding Standards Issues | phpcs » Fix the issues reported by phpcs
Category: Bug report » Task
Status: Reviewed & tested by the community » Needs work
Issue tags: -, - +Coding standards
+  3. Navigate to Administration > Configuration > System > Recently read
+        config to configure.

The last line is not indented corrected. It should start 2 spaces to the right of the previous line.

 /**
- * Class RecentlyReadTypeForm.
+ * The Class RecentlyReadTypeForm.

That description is still repeating the class name, while it should describe what the class does.

-  protected $defaultTheme = 'bartik';
+  protected $defaultTheme = 'stark';

The report shown in the issue summary does not say that the default value for that property must be changed.

mrinalini9’s picture

Status: Needs work » Needs review
StatusFileSize
new6.81 KB
new2.11 KB

Updated patch #6 by addressing #11, please review it.

Thanks!

thakurnishant_06’s picture

StatusFileSize
new137.89 KB
new19.36 KB

Hello Folks !!

I have applied and tested the #12 patch and the phpcs issues has been successfully fixed! The patch was tested on Drupal 9.5.9 and PHP 8.2.4. To provide you with a comprehensive view, I will be adding both a before and after screenshot.

Thank you for your support!!

avpaderno’s picture

Priority: Normal » Minor
Status: Needs review » Needs work
-       recently read articles.
-  3. Navigate to Administration > Configuration > System > Recently read config to
-       configure.
+  recently read articles.
+  3. Navigate to Administration > Configuration > System > Recently read
+  config to configure.
   4. From the "Configuration" tab, enable entity types for which you want
-       to track recently read items. There are also options for deleting the records:
-       Time based, Count based, or Never.
-  5. From the "List" tab, entities can be individually configured by
-       selecting the "Edit" option.
+  to track recently read items. There are also options for deleting the records:
+  Time based, Count based, or Never.
+  5. From the "List" tab, entities can be individually configured by selecting
+  the "Edit" option.
   6. Navigate to Administration > Structure > Views to create a new view for
-       Recently read content (Content) just add a relationship to Recently read
-       with Require this relationship option checked. See (Recently read content)
-       as an example.
+  Recently read content (Content) just add a relationship to Recently read
+  with Require this relationship option checked. See (Recently read content) as
+  an example.

I apologize if I have not been clear. This is how that text should be formatted.

  1. Navigate to Administration > Extend and enable the module.
  2. When the module is enabled, it automatically creates a view block for
     recently read articles.
  3. Navigate to Administration > Configuration > System > Recently read config
     to configure.
  4. From the "Configuration" tab, enable entity types for which you want
     to track recently read items. There are also options for deleting the
     records: Time based, Count based, or Never.
  5. From the "List" tab, entities can be individually configured by
     selecting the "Edit" option.
  6. Navigate to Administration > Structure > Views to create a new view for
     Recently read content (Content) just add a relationship to Recently read
     with Require this relationship option checked. See (Recently read content)
     as an example.
+/**
+ * @file
+ * Install, update and uninstall functions for the Recently Read module.
+ */
+

A comma is missing before and.

 /**
- * Class RecentlyReadTypeForm.
+ * Defines the Recently read type form.
  */

the Recently read type form does not say what the form does.

 /**
- * Interface RecentlyReadServiceInterface.
+ * The Interface RecentlyReadServiceInterface.
  *

That is still just repeating the interface name. The article at the beginning does not change that.

imustakim’s picture

Assigned: Unassigned » imustakim

Working on this.

imustakim’s picture

Assigned: imustakim » Unassigned
Status: Needs work » Needs review
StatusFileSize
new6.75 KB
new2.49 KB

Updated patch addressing suggestions mentioned in #14.
Please review.

thakurnishant_06’s picture

StatusFileSize
new42.86 KB

Hello imustakim,

I have reviewed your patch & Implemented it on my website having Drupal version-9.5.9 And PHP version - 8.2
I am adding screenshot(after applying the patch) for your reference.
Please have a look.

Thank You for your support!!!

shyam_bhatt’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new24.59 KB

I have reviewed your patch & Implemented it on my website having Drupal version 10.0.9 And PHP version 8.1
The patch #16 is working fine.

Please take the latest pull of the "8.x-1.x" and run the below command from the root folder:
vendor/bin/phpcs --standard=DrupalPractice,Drupal --extensions=php,module,info,txt,md,yml web/modules/contrib/recently_read/

Please check the below screenshot:
2023-06-08/3332563-18-after.png

DeaOm made their first commit to this issue’s fork.

deaom’s picture

Status: Reviewed & tested by the community » Needs review

Corrected order of use statements and also removed static calls for loading entities, added type hint etc. Needs review as there are not adequate test, to see if anything broke.

admirlju made their first commit to this issue’s fork.

admirlju’s picture

Status: Needs review » Reviewed & tested by the community

Rebased and tested the code. From what I see everything works like it's supposed to. The tests issued are being handled by #3382214: Drupal 10 Fix deprecations in tests. Marking the issue as RTBC. Should be now ready for merge.

avpaderno’s picture

Status: Reviewed & tested by the community » Needs work
thakurnishant_06’s picture

Status: Needs work » Needs review

Hello updated the file as per the changes suggested . Kindly review the changes
Thank you .

paraderojether’s picture

Status: Needs review » Reviewed & tested by the community

Hi

I reviewed MR!6, applied against Recently Read 8.x-1.x-dev, and confirmed it fixes the issues reported by phpcs.

➜  recently_read git:(2eb445a) curl https://git.drupalcode.org/project/recently_read/-/merge_requests/6.diff | patch -p1
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 37599    0 37599    0     0  87599      0 --:--:-- --:--:-- --:--:-- 89521
patching file README.txt
patching file recently_read.info.yml
patching file recently_read.install
patching file recently_read.module
patching file recently_read.views.inc
patching file 'src/Entity/RecentlyRead.php'
patching file 'src/Entity/RecentlyReadInterface.php'
patching file 'src/Entity/RecentlyReadType.php'
patching file 'src/Entity/RecentlyReadTypeInterface.php'
patching file 'src/Form/RecentlyReadConfigForm.php'
patching file 'src/Form/RecentlyReadTypeForm.php'
patching file 'src/Plugin/views/relationship/RecentlyReadRelationship.php'
patching file 'src/RecentlyReadHtmlRouteProvider.php'
patching file 'src/RecentlyReadService.php'
patching file 'src/RecentlyReadServiceInterface.php'
patching file 'src/RecentlyReadStorageSchema.php'
patching file 'src/RecentlyReadTypeListBuilder.php'
patching file 'tests/src/Functional/RecentlyReadBlockTest.php'
➜  recently_read git:(2eb445a) ✗ cd ..
➜  contrib git:(main) ✗ phpcs --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml,twig recently_read
➜  contrib git:(main) ✗

Thank you.

avpaderno’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Needs work
avpaderno’s picture

Issue summary: View changes

avpaderno changed the visibility of the branch 3332563-gitlab-ci-reports to hidden.

Anonymous’s picture

Status: Needs work » Closed (outdated)

I'm closing this issue as outdated because coding standards were resolved in Drupal 11 Compatibility release.