-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[4.0] Module dispatcher #19834
[4.0] Module dispatcher #19834
Conversation
…nents/service/dispatcher # Conflicts: # libraries/src/Application/CMSApplication.php # libraries/src/Application/CMSApplicationInterface.php # libraries/src/Application/CliApplication.php # libraries/src/Application/ConsoleApplication.php # libraries/src/Categories/Categories.php # libraries/src/MVC/Model/BaseDatabaseModel.php
|
Yes, that's the new approach we go, introduced by pr #19811. I will convert the rest of the core extensions when all services like Associations, etc. is done. |
…e/services # Conflicts: # libraries/src/Extension/ExtensionManagerTrait.php
…e/services # Conflicts: # libraries/src/Dispatcher/ComponentDispatcher.php
Any more feedback? |
@laoneo Why is it called Other than that, the consistency looks good. This PR is also so huge I think we should just start using it and see if we run into any issues :) |
Was a suggestion from @wilsonge to have it crystal clear that this is the default one. Having a look now, it would probably make sense to rename it back to |
@laoneo Just my first thought was why does that have a different name. Makes more sense to me to stick to one naming scheme. |
Ok, renamed it. Looks indeed more clear. |
@laoneo the drone failed?? |
just rebooted the tests. |
Drone is failing atm all the time with a user system test. Rebooting doesn't help, the test needs to be fixed. |
Thanks for being so patient on this one! |
Time brought a couple of good ideas. |
Summary of Changes
Introduces a
ModuleDispatcher
as replacement for the single entry file for modules. The workflow is then similar to components with a Dispatcher and a service provider.A module needs then a file services/provider.php which does register the
ModuleInterface::class
resource in the container:and a dispatcher created by the
DispatcherFactory
. The dispatcher can override the functiongetLayoutData()
to provide additional data for the layout. The rest stays the same.More information can be found in #20217 and #19667.
Testing Instructions
Open the front end.
Expected result
The Menu module should work as before.
Actual result
All is working fine.
Documentation Changes Required
Needs to be documented as with the Dispatcher for components.