Drupal dependency injection

Created on 5 November 2018, over 6 years ago
Updated 27 May 2025, 12 days ago

Problem/Motivation
The Drupal and DrupalPractice request depency injection

Proposed resolution
Inject objects

Remaining tasks

------ -----------------------------------------------------------------------------------------------------------------------
Line src/AliasStorageHelper.php
------ -----------------------------------------------------------------------------------------------------------------------
85 \Drupal calls should be avoided in classes, use dependency injection instead
166 Method Drupal\pathauto\AliasStorageHelper::loadBySource() should return array|bool but return statement is missing.
181 Method Drupal\pathauto\AliasStorageHelper::deleteBySourcePrefix() should return bool but return statement is missing.
------ -----------------------------------------------------------------------------------------------------------------------

------ -------------------------------------------------------------------------------
Line src/Entity/PathautoPattern.php
------ -------------------------------------------------------------------------------
432 Instantiated class Drupal\pathauto\Entity\ContextNotFoundException not found.
๐Ÿ’ก Learn more at https://phpstan.org/user-guide/discovering-symbols
------ -------------------------------------------------------------------------------

------ --------------------------------------------------------------------------------------------------------
Line src/Form/PatternEditForm.php
------ --------------------------------------------------------------------------------------------------------
277 Method Drupal\pathauto\Form\PatternEditForm::save() should return int but return statement is missing.
------ --------------------------------------------------------------------------------------------------------

------ ------------------------------------------------------------------------------
Line src/PathautoGenerator.php
------ ------------------------------------------------------------------------------
150 \Drupal calls should be avoided in classes, use dependency injection instead
------ ------------------------------------------------------------------------------

------ -----------------------------------------------------------------------------------------------------
Line src/PathautoItem.php
------ -----------------------------------------------------------------------------------------------------
36 Method Drupal\pathauto\PathautoItem::postSave() should return bool but return statement is missing.
------ -----------------------------------------------------------------------------------------------------

------ ------------------------------------------------------------------------------
Line src/PathautoWidget.php
------ ------------------------------------------------------------------------------
41 \Drupal calls should be avoided in classes, use dependency injection instead
51 \Drupal calls should be avoided in classes, use dependency injection instead
------ ------------------------------------------------------------------------------

------ ------------------------------------------------------------------------------
Line src/Plugin/Action/UpdateAction.php
------ ------------------------------------------------------------------------------
25 \Drupal calls should be avoided in classes, use dependency injection instead
------ ------------------------------------------------------------------------------

------ ------------------------------------------------------------------------------
Line src/Plugin/pathauto/AliasType/EntityAliasTypeBase.php
------ ------------------------------------------------------------------------------
278 \Drupal calls should be avoided in classes, use dependency injection instead
------ ------------------------------------------------------------------------------

User interface changes

API changes

Data model changes

๐Ÿ“Œ Task
Status

Active

Version

1.0

Component

Code

Created by

๐Ÿ‡ง๐Ÿ‡ทBrazil thalles Teรณfilo Otoni - MG

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024