-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
[REF] Alter new Setup process to use CiviCRM's Event Dispatcher #20717
[REF] Alter new Setup process to use CiviCRM's Event Dispatcher #20717
Conversation
(Standard links)
|
also ping @kcristiano |
My guess given that setup sometimes duplicates code found elsewhere is that there was a desire to minimize dependence on something that hasn't been installed/bootstrapped yet. But it does already call some civi things so I can just give it a quick test to see. |
And just to clarify the description this was in the context of drupal 9 using a newer symfony which annoyingly switches the order of parameters giving deprecation notices. |
Runs ok for me. |
Most of the added bits in I was slightly concerned about the class being available -- but the setup protocol specifies that Civi classes shall be loadable before we get here (ie before Step 3 - As currently written, the part to watch out for is Fortunately, the setup-dispatcher doesn't actually call self::$instance->dispatcher = new CiviEventDispatcher();
self::$instance->dispatcher->setDispatchPolicy(['/^civi\.setup\./' => 'run', '/./' => 'fail']); |
Apply patch from Tim to limit what events are dispatched
53ec7cf
to
c95fbf9
Compare
ok I have applied that additional guard from Tim and I think this is right to be merged now |
Runs ok for me. |
Overview
This changes CiviSetup to use Civi Core's event dispatcher
Before
Uses the EventDispatcher directly
After
Uses the CiviCore Event dispatcher which currently extends off of the Symfony Event DIspatcher
ping @totten @demeritcowboy