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] Load the component dispatcher through the ComponentInterface #19811
[4.0] Load the component dispatcher through the ComponentInterface #19811
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
61f2348
to
d442435
Compare
$container->set('categories', ['' => new Category]); | ||
$container->set(Categories::class, ['' => new Category]); | ||
|
||
$container->set(DispatcherFactoryInterface::class, new DispatcherFactory('\\Joomla\\Component\\Content')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be able to access frontend and backend dispatchers here I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean without a factory? I had that on a first version but moved to a factory because we will not be able to inject the application from the ComponenHelper, instead of its the one from the container. It leads then to an assumption that the app in the ComponentHelper is the same as in the container.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No I'm just being stupid :)
Ongoing effort to migrate the component services to the
ComponentInterface
.The dispatcher is created by a an injected factory in the
ComponentInterface
.