FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\pagedesigner_responsive_images\src\PathProcessor\ImageStylePathProcessor.php
-------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
-------------------------------------------------------------------------------------------------------------------------------
28 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------------------------------------------

FILE: C:\xampp\htdocs\drupal95\web\modules\contrib\pagedesigner_responsive_images\src\ResponsiveImageStylesTwigExtension.php
----------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------------
51 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
53 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
81 | WARNING | ImageStyle::load calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------------------------------------

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

Harsh panchal created an issue. See original summary.

Harsh panchal’s picture

Assigned: Harsh panchal » Unassigned
Category: Task » Bug report
Status: Active » Needs review
StatusFileSize
new4.08 KB

I have fixed this issue and providing a patch.

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

dipesh_goswami’s picture

Assigned: Unassigned » dipesh_goswami

Hi Harsh panchal,
I am reviewing your patch.
Thanks

dipesh_goswami’s picture

Assigned: dipesh_goswami » Unassigned
Status: Needs review » Reviewed & tested by the community

Hi Harsh panchal,

Your patch applied cleanly (shown below):

dipes@Lucky MINGW64 /c/xampp/htdocs/dipeshdrupal/web/modules/contrib/pagedesigner_responsive_images-3304480 (3304480-drupal-calls-should)
$ git apply -v Drupal-calls-should-be-avoided-3304480-2.patch
Checking patch src/PathProcessor/ImageStylePathProcessor.php...
Checking patch src/ResponsiveImageStylesTwigExtension.php...
Applied patch src/PathProcessor/ImageStylePathProcessor.php cleanly.
Applied patch src/ResponsiveImageStylesTwigExtension.php cleanly.

All the issues related to "\Drupal calls should be avoided in classes, use dependency injection instead" are fixed.

So moving it to RTBC.
And creating a MR.
Thanks.

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

pvbergen’s picture

  • pvbergen committed 9d26d3e4 on 2.2.x
    #3304480: Add missing arguments, comments
    
pvbergen’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.