Remove service location anti-patterns in constructors AJAX system

Created on 26 May 2023, over 2 years ago

@mglaman pointed out the possible problem of these three patterns in the class constructor in his blog:
$this->request = $request_stack->getCurrentRequest();
$this->nodeStorage = $entity_type_manager->getStorage('node');
$this->config = $config_factory->get('mymodule.settings');

the following classes are affected:

$config_factory->get():

Drupal\Core\Ajax\AjaxResponseAttachmentsProcessor

📌 Task
Status

Active

Version

11.0 🔥

Component
Ajax 

Last updated about 2 months ago

Created by

🇩🇪Germany sleitner

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

Comments & Activities

Production build 0.71.5 2024