? Pending

User tests: Successful: Unsuccessful:

avatar yvesh
yvesh
14 Jun 2017

Pull Request for Issue #16616

Summary of Changes

  • Move the namespace map creation / loading to render method in CMSApplication (as suggested by Michael), this should fix the installer issues
  • Load the generated namespace map file
  • Minor fixes in the namespace file

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

avatar yvesh yvesh - open - 14 Jun 2017
avatar yvesh yvesh - change - 14 Jun 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Jun 2017
Category Libraries
avatar zero-24 zero-24 - change - 14 Jun 2017
The description was changed
avatar zero-24 zero-24 - edited - 14 Jun 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 14 Jun 2017

@yvesh PR for #16616?

avatar yvesh yvesh - change - 14 Jun 2017
The description was changed
avatar yvesh yvesh - edited - 14 Jun 2017
avatar yvesh yvesh - change - 14 Jun 2017
The description was changed
avatar yvesh yvesh - edited - 14 Jun 2017
avatar yvesh yvesh - change - 14 Jun 2017
Labels Added: ?
avatar joomdonation
joomdonation - comment - 14 Jun 2017

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:

  1. There are still some components like com_categories, com_cpanel, com_fields... not registered in autoload_psr4.php

  2. Do we want to support autoload for cli applications? Asking this question because we still register model class manually here https://github.com/joomla/joomla-cms/blob/4.0-dev/cli/finder_indexer.php#L238-L239

avatar wilsonge
wilsonge - comment - 14 Jun 2017

There are still some components like com_categories, com_cpanel, com_fields... not registered in autoload_psr4.php

They are missing from the install sql script and XML files - easy to fix.

Do we want to support autoload for cli applications? Asking this question because we still register model class manually here https://github.com/joomla/joomla-cms/blob/4.0-dev/cli/finder_indexer.php#L238-L239

Yes - but unsure where the best place to do that is. People may have to implement that manually?

avatar joomdonation
joomdonation - comment - 14 Jun 2017

They are missing from the install sql script and XML files - easy to fix.
I know. Just wanted to point out so that we won't forget

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.

avatar mbabker
mbabker - comment - 14 Jun 2017

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 JApplicationCms for CLI basically went nowhere because everything that is not serving HTML responses (JSON views, CLI) is still treated as a second class citizen in Joomla.

avatar Bakual
Bakual - comment - 14 Jun 2017

There are still some components like com_categories, com_cpanel, com_fields... not registered in autoload_psr4.php

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.

avatar joomdonation
joomdonation - comment - 14 Jun 2017

@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.

avatar yvesh
yvesh - comment - 14 Jun 2017

@joomdonation yep, but one step after another :-) Than we can continue updating the entries in the #__extensions table

avatar joomdonation
joomdonation - comment - 14 Jun 2017

@yvesh As I said, just pointed out so that we won't forget only

avatar wilsonge wilsonge - change - 15 Jun 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-06-15 11:39:01
Closed_By wilsonge
avatar wilsonge wilsonge - close - 15 Jun 2017
avatar wilsonge wilsonge - merge - 15 Jun 2017
avatar wilsonge
wilsonge - comment - 15 Jun 2017

Merged so that we have a working installer for people

Add a Comment

Login with GitHub to post a comment