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

[j4] Load the correct namespace when it doesn't exist #15219

Merged
merged 4 commits into from
Apr 12, 2017

Conversation

laoneo
Copy link
Member

@laoneo laoneo commented Apr 11, 2017

The dispatcher is loading the correct namespace when it doesn't exist.

@@ -9,7 +9,9 @@

defined('_JEXEC') or die;

use Joomla\CMS\Application\CmsApplication;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldnt we be using CMSApplication?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the right class https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/CMS/Application/CmsApplication.php#L27. If you want to make it upper case, then a pr is needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Up to others to decide but if we have /CMS/ then I believe we should have /CMSApplication/ for the same reason

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wilsonge
Copy link
Contributor

I don't think this works if $namespace is a compulsory parameter in the constructor

@laoneo
Copy link
Member Author

laoneo commented Apr 11, 2017

@wilsonge don't get you. This actually fixes the case when the entry in the database is empty.

@wilsonge
Copy link
Contributor

…amespace

# Conflicts:
#	administrator/components/com_content/dispatcher.php
@laoneo
Copy link
Member Author

laoneo commented Apr 12, 2017

It is most likely '' when there is no value in the database.

@laoneo
Copy link
Member Author

laoneo commented Apr 12, 2017

I mean it is just a workaround till we have the autoloading #15226 merged, when people try out the 4.0-dev branch.

laoneo added a commit to joomla-projects/media-manager-improvement that referenced this pull request Apr 12, 2017
@laoneo laoneo changed the title Load the correct namespace when it doesn't exist [j4] Load the correct namespace when it doesn't exist Apr 12, 2017
@wilsonge wilsonge merged commit 9a77f2e into joomla:4.0-dev Apr 12, 2017
@wilsonge wilsonge added this to the Joomla 4.0 milestone Apr 12, 2017
@laoneo laoneo deleted the j4/fix/namespace branch April 13, 2017 08:27
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.

5 participants