\Drupal calls should be avoided in classes, use dependency injection instead

Created on 10 July 2023, over 1 year ago
Updated 16 July 2023, over 1 year ago

Problem/Motivation

FILE: /home/lenovo/d7to9/web/modules/contrib/crossword/modules/crossword_colors/src/Form/CrosswordColorsConfigForm.php
----------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
----------------------------------------------------------------------------------------------------------------------
 77 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 80 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 81 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------------------------------

FILE: /home/lenovo/d7to9/web/modules/contrib/crossword/modules/crossword_image/src/Form/CrosswordImageRegenerateForm.php
------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
------------------------------------------------------------------------------------------------------------------------
 55 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 74 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------------------------------

FILE: /home/lenovo/d7to9/web/modules/contrib/crossword/modules/crossword_contest/src/Controller/CrosswordContestController.php
------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 6 WARNINGS AFFECTING 6 LINES
------------------------------------------------------------------------------------------------------------------------------
  37 | WARNING | Media::load calls should be avoided in classes, use dependency injection instead
  40 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
  44 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
  64 | WARNING | Media::load calls should be avoided in classes, use dependency injection instead
  98 | WARNING | File::load calls should be avoided in classes, use dependency injection instead
 100 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------------------------------------

FILE: /home/lenovo/d7to9/web/modules/contrib/crossword/src/CrosswordFileParserPluginBase.php
------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
------------------------------------------------------------------------------------------------
 43 | WARNING | File::load calls should be avoided in classes, use dependency injection instead
------------------------------------------------------------------------------------------------

FILE: /home/lenovo/d7to9/web/modules/contrib/crossword/tests/modules/crossword_pseudofields_tests/src/Controller/CrosswordTestsController.php
---------------------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
---------------------------------------------------------------------------------------------------------------------------------------------
 29 | WARNING | Node::load calls should be avoided in classes, use dependency injection instead
 32 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 34 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
 37 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
---------------------------------------------------------------------------------------------------------------------------------------------

FILE: /home/lenovo/d7to9/web/modules/contrib/crossword/tests/modules/crossword_tests/src/Controller/CrosswordTestsController.php
--------------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINES
--------------------------------------------------------------------------------------------------------------------------------
 30 | WARNING | [ ] Node::load calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------------------------------------------------------

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Closed: won't fix

Version

2.0

Component

Code

Created by

🇮🇳India roshni27

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024