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

Allow cache-rebuild to fix more things #6243

Merged

Conversation

alexpott
Copy link
Contributor

If we add this annotation the cache rebuild command becomes even more useful and can recover from more terminal issues.

For example if you change the Drupal core service name cache.backend.database to cache.backend.databas and do a drush cr you'll get an error. On HEAD if you go back and fix this and then run drush cr again it'll still be broken. With this change drush cr is capable of fixing the site.

@alexpott
Copy link
Contributor Author

Drush cr not rebuilding the container has been observed in https://www.drupal.org/project/entity_usage/issues/3509039 for example.

@weitzman
Copy link
Member

Nice find. This certainly fixes the scenario described in the OP. Otherwise, the CacheRebuildsCommands class doesn't get instantiated until FULL bootstrap. I'm surprised this hasn't come up earlier.

@weitzman weitzman merged commit 61eb7df into drush-ops:13.x Feb 28, 2025
1 check passed
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.

2 participants