Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
204 | WARNING | \Drupal calls should be avoided in classes, use
| | dependency injection instead
Proposed resolution
inject the object use Drupal\Core\State\State;
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#2 | xmlsitemap-drupal_injection_on_XmlSitemapEntitiesSettingsForm-3015350.patch | 2.05 KB | thalles |
|
Comments
Comment #2
thallesComment #3
alex_optimGood for me.
Comment #4
volegerLooks good, injection of state service is properly done.
Comment #5
pifagorComment #7
pifagor