Skip to content

#6628: Added a command to remove a deploy hook from the list of deployed hooks in the site State #6280

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

Open
wants to merge 8 commits into
base: 13.x
Choose a base branch
from

Conversation

harivansh0
Copy link

No description provided.

@harivansh0 harivansh0 marked this pull request as draft April 27, 2025 12:18
@harivansh0 harivansh0 marked this pull request as ready for review May 11, 2025 15:17
@harivansh0 harivansh0 changed the title 6628: Added the hook-list command to show all deployed hooks. #6628: Added the hook-list command to show all deployed hooks. May 11, 2025
@harivansh0 harivansh0 changed the title #6628: Added the hook-list command to show all deployed hooks. #6628: Added a command to remove a deploy hook from the list of deployed hooks in the site State May 11, 2025
});

// Update the deployed hook list.
\Drupal::service('keyvalue')->get('deploy_hook')->set('existing_updates', $update_functions);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should have this service available as $this->keyValue.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @MurzNN
The DeployHookCommands class does not have a keyValue property. Although the getRegistry() function injects the service, the class extends UpdateRegistry, which defines keyValue as a protected property. Since it's protected and not accessible directly in the subclass, we cannot use it, without modifying the drupal core UpdateRegistry or use refelection.

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