Ignore decorating invalid service in DPL GraphQL #1800
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Patch Drupal Core to prevent errors when decorating non-existent services.
We currently have an issue with our
dpl_graph
module referring to a service provided by thesimple_oauth
module. We would normally enable this module using an update hook (or config import) but it is not possible to do so as Drush will error out befure runninng anything.To address this we patch Drupal Core to add support for the Symfony
decoration_on_invalid
property.This patch has been accepted for Drupal 10.4.x and 11.x so it should be safe to merge.
Ignore decorating the oath token request policy if not available.
See https://symfony.com/doc/current/service_container/service_decoration.html#control-the-behavior-when-the-decorated-service-does-not-exist
Additional comments or questions
This is an alternate take to the solution suggested in #1799. I think it in many ways is a cleaner take to the take problem - both in regards to the project codebase and in avoiding the error while we wait for Drupal 10.4.