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.
It is a good practice to use dependency injection. Please note that ShieldSettingsForm is conditionally using plugin.manager.key.key_type service so dependency injection should take care of it.
It is follow up of https://www.drupal.org/project/shield/issues/2996397#comment-13579073
Comment | File | Size | Author |
---|---|---|---|
#8 | shield-3132344-7-di.patch | 6.3 KB | geek-merlin |
| |||
#3 | shield-dependency-injection-3132344-3.patch | 6.59 KB | vbouchet |
Comments
Comment #2
vbouchetComment #3
vbouchetPlease find a patch.
Comment #4
vbouchetComment #6
vbouchetNot sure why CI moves to "Need work" given it is a success.
Comment #7
geek-merlinThanks! I think we can simplify this a lot with nullable constructor injection, let's see.
Also i committed #2953625: Add tests so i hope the bot will be more friendly now.
Comment #8
geek-merlinANd here's the patch.
Comment #9
vbouchetThanks for the follow up and tip ;-) Looks all good on my side.
Comment #10
geek-merlinThanks! Committed and pushed.