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

[4.0] Load the component dispatcher through the ComponentInterface #19811

Merged

Conversation

laoneo
Copy link
Member

@laoneo laoneo commented Mar 2, 2018

Ongoing effort to migrate the component services to the ComponentInterface.

The dispatcher is created by a an injected factory in the ComponentInterface.

…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
@laoneo laoneo force-pushed the j4/components/service/dispatcher branch from 61f2348 to d442435 Compare March 2, 2018 09:05
$container->set('categories', ['' => new Category]);
$container->set(Categories::class, ['' => new Category]);

$container->set(DispatcherFactoryInterface::class, new DispatcherFactory('\\Joomla\\Component\\Content'));
Copy link
Contributor

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

Copy link
Member Author

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.

Copy link
Contributor

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 :)

@wilsonge wilsonge merged commit 5888634 into joomla:4.0-dev Mar 4, 2018
@wilsonge wilsonge deleted the j4/components/service/dispatcher branch March 4, 2018 21:50
@wilsonge wilsonge added this to the Joomla 4.0 milestone Mar 4, 2018
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.

None yet

3 participants