- Merge request !6098DI in permission callbacks for TaxonomyPermissions → (Open) created by Hardik_Patel_12
- 🇮🇳India Hardik_Patel_12 India
Updated the DI in permission callbacks for TaxonomyPermissions.php, a change record is still needed.
- 🇬🇧United Kingdom joachim
> This will also need a change record. Thanks!
I don't think this needs a CR - the class is internal. It's not even a service.
- 🇵🇪Peru krystalcode
Removing unused Drupal\Core\StringTranslation\TranslationInterface and unused $this->stringTranslation service injection it is not used in file.
The string translation service is used many times in this file, every time
$this->t()
is called. TheStringTranslationTrait
takes care of it if it is missing, but it's hacky and renders the class more difficult to test. It is there for cases where dependency injection is not available or for developer that do not know how to do it, but it should be injected when possible: https://git.drupalcode.org/project/drupal/-/blob/11.x/core/lib/Drupal/Co... - First commit to issue fork.
- 🇦🇺Australia acbramley
Rebased, updated to use autowiring and constructor property promotion, changed to not inject entity storage, added CR and deprecation message although I somewhat agree this is overkill.
- 🇺🇸United States smustgrave
Opened 🌱 META: Use dependency injections in permission callbacks Active to track others
Change here though seems pretty straightforward though, good deprecation.
LGTM