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 autoload_psr4.php and some minor fixes #16680
Conversation
Yes was my error -> fixed ;) @franz-wohlkoenig |
@franz-wohlkoenig yep, fixes that also - updated description. Thanks :-) |
@@ -1025,6 +1023,8 @@ public function redirect($url, $status = 303) | |||
*/ | |||
protected function render() | |||
{ | |||
$this->createExtensionNamespaceMap(); |
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.
This needs to go in execute (see https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/CMS/Application/CMSApplication.php#L321)
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.
@wilsonge done
Installation works fine now, autoload_psr4.php is generated properly. I tried to exclude Component from JLoader loadByExtension method https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/loader.php#L556 and everything still works well. Some notes if we decide to go with this approach:
|
They are missing from the install sql script and XML files - easy to fix.
Yes - but unsure where the best place to do that is. People may have to implement that manually? |
I am unsure, too as I haven't written any Cli application. I think it is inconsistent when we have autoload support in Site/Administrator but not in Cli. |
The problem is all of our existing CLI scripts are all separate applications without any common structure and the last proposal to make something equivalent to a |
They already autoload fine without this autoload_psr4.php. If we want to drop the existing autoload code for the "Joomla Namespace" in favor of this autoload_psr4 file, then we have to add the namespace to the database of those extensions and this script will pick it up. Otherwise it's not needed. |
@Bakual I know that. But I think the purpose of autoload_psr4.php is to replace the existing autoload code (at least for components part). So if this approach is accepted, we need to register the missing components and drop the existing autoload code. |
@joomdonation yep, but one step after another :-) Than we can continue updating the entries in the #__extensions table |
@yvesh As I said, just pointed out so that we won't forget only |
Merged so that we have a working installer for people |
Pull Request for Issue #16616
Summary of Changes
Testing Instructions
Make sure you delete the old autoload_psr4.php in libraries before.
Check that libraries/autoload_psr4.php is generated and paths are loaded.
Expected result
Installation works
Actual result
Installation is broken on default SQL credentials
Documentation Changes Required
Probably