Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore decorating invalid service in DPL GraphQL #1800

Merged
merged 2 commits into from
Nov 26, 2024

Conversation

kasperg
Copy link
Contributor

@kasperg kasperg commented Nov 26, 2024

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 the simple_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.

…ices

We currently have an issue with our DPL Graph module referring to
a service provided by the simple_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.
This will avoid the error if the simple_oath module is not enabled.

This is the case before running the update/deploy hook which is
responsible for enabling the module.

See https://symfony.com/doc/current/service_container/service_decoration.html#control-the-behavior-when-the-decorated-service-does-not-exist
@kasperg kasperg merged commit 28982eb into develop Nov 26, 2024
20 checks passed
@kasperg kasperg deleted the fixing-graphql-take-2 branch November 26, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants