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

Refactor the whole package to use events #39

Merged
merged 4 commits into from
Nov 24, 2022
Merged

Conversation

Jelle-S
Copy link
Collaborator

@Jelle-S Jelle-S commented Nov 15, 2022

Because of consolidation/annotated-command#273, which technically speaking contains a BC break, it was made clear for us that we're not using Robo or the consolidation packages as they were intended. In an effort to keep this package as extendible as possible, and keeping the same philosophy as before, we switched to an event-based system. Basically every step in a command fires an event. The event listener returns a HandlerWithPriority, which it turn returns a TaskInterface to be executed for this step in the command. We made our own implementation of event priorities, since the default implementation used in Robo doesn't support them
(consolidation/annotated-command#244).

I tried to document everything as well as possible in the README, but it might (probably will) need some lovin'.

This package contains default event handlers with some sensible (to us) defaults. You can prevent these handlers from being executed by writig your own handler with a higher priority (lower number) which does its thing and then calls $event->stopPropagation().

Because of consolidation/annotated-command#273,
which technically speaking contains a BC break, it was made clear for us
that we're not using Robo or the consolidation packages as they were
intended. In an effort to keep this package as extendible as possible,
and keeping the same philosophy as before, we switched to an event-based
system. Basically every step in a command fires an event. The event
listener returns a `HandlerWithPriority`, which it turn returns a
`TaskInterface` to be executed for this step in the command. We made our
own implementation of event priorities, since the default implementation
used in Robo doesn't support them
(consolidation/annotated-command#244).

I tried to document everything as well as possible in the README, but it
might (probably will) need some lovin'.

This package contains default event handlers with some sensible (to us)
defaults. You can prevent these handlers from being executed by writig
your own handler with a higher priority (lower number) which does its
thing and then calls `$event->stopPropagation()`.
@Jelle-S Jelle-S requested a review from dubgeiser November 15, 2022 14:52
Improve documentation by referencing the robo-digipolis-deploy
documentation about providing database connection details.

Fix a broken anchor link.

By default, create a backup and rollback during deploy. Add
documentation for the option in the `properties.yml` documentation.
Call to undefined method
DigipolisGent\Robo\Drupal8\Robo\Plugin\Commands\DigipolisDrupal8DeployCommand::taskSsh()
@Jelle-S Jelle-S merged commit c11b473 into develop Nov 24, 2022
@Jelle-S Jelle-S deleted the feature/events-refactor branch November 24, 2022 08:13
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