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

[DDST-215] Drush 12 compatibility #42

Merged
merged 7 commits into from
Jun 4, 2024
Merged

[DDST-215] Drush 12 compatibility #42

merged 7 commits into from
Jun 4, 2024

Conversation

JojoVes
Copy link
Contributor

@JojoVes JojoVes commented May 29, 2024

The error encountered prior to these fixes:
Attempting to run the drush dgi_actions:generate or drush dgi_actions:print_ids commands got this error:

  There are no commands defined in the "dgi_actions" namespace.

Turns out the namespacing and addition of the create() method for dependency injection wasn't the thing preventing the commands in the dgi_actions namespace from being found, since those changes are actually only going to be strictly necessary in Drush 13...still worth including that future-proofing, but the real bug was the logger.dgi_actions listed in drush.services.yml which is an issue I only found by adding the -vvv tag when trying to run either of those dgi_actions drush commands:
Service logger.dgi_actions does not have a class element; skipping modules/contrib/dgi_actions/drush.services.yml

So, the only necessary change in the end appears to be that logger change, but the other cleanup is still worth keeping since it was mostly done before realizing it would only be strictly required for Drush 13.

@JojoVes JojoVes added the patch Backwards compatible bug fixes. label May 29, 2024
According to
https://www.drush.org/12.x/dependency-injection/#create-method, the type
should be `Psr\Container\ContainerInterface`, not
`Symfony\Component\DependencyInjection\ContainerInterface`, which
I almost didn't catch because both seem to work, but I'm making this
change since it's specifically called out in the documentation.
@JojoVes JojoVes marked this pull request as ready for review May 29, 2024 20:23
@nchiasson-dgi nchiasson-dgi merged commit 881a302 into main Jun 4, 2024
1 check passed
@nchiasson-dgi nchiasson-dgi deleted the fix/drush-12 branch June 4, 2024 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch Backwards compatible bug fixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants