? ? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
6 Feb 2017

Namespaces libraries/joomla/access. An alias is created for JRule and JRules classes as well.

Additionally a search and replace is done on the whole code base to use the namespaced classes.

Ping @mbabker and @wilsonge.

avatar laoneo laoneo - open - 6 Feb 2017
avatar laoneo laoneo - change - 6 Feb 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 6 Feb 2017
Category Administration com_associations com_banners com_cache com_categories com_checkin com_config com_contact com_content com_contenthistory com_fields com_finder com_installer com_joomlaupdate com_languages com_media com_menus com_messages com_modules com_newsfeeds com_plugins com_redirect com_search com_tags com_templates
avatar laoneo laoneo - change - 6 Feb 2017
Labels Added: ?
avatar photodude
photodude - comment - 9 Feb 2017

This is a nice improvement, can you fix the conflict so we can move forward with review?

avatar laoneo
laoneo - comment - 9 Feb 2017

We'r actually discussing if we should namespace the libraries folder in the 3 series or only in J4. This PR is an example how it would look like then. Either way we namespace the whole libraries folder in 3.8 and remove the classmap in 4 or we do it in 4 and then have to support the whole none namespaced stuff during the 4 lifecycle, means on every request in J4 the huge classmap file will be loaded.

avatar photodude
photodude - comment - 9 Feb 2017

I think the sooner we get this done the better. (I'm also blind to any possible negatives to that approach)

avatar laoneo
laoneo - comment - 9 Feb 2017

I prefer also to clean the house in J4, but not everybody agrees in the J4 team.

avatar photodude
photodude - comment - 9 Feb 2017

As long as there is a reasonable upgrade path for users/admins and we make it reasonable for developers to maintain/upgrade their 3rd party code we should clean as much as possible. Too many or too complex B/C breaks in past versions have turned off users/admins/developers.

avatar mbabker
mbabker - comment - 9 Feb 2017

The major downside to trying for a "clean slate" approach in 4.0 is no 3.x release (including 3.7) will have any form of compatibility with 4.0. If that plan is followed through on, only 3.8 would have compatibility and 4.0 would remove most of that "legacy layer". So while it'd be true that you could achieve 3.x and 4.0 compatibility in extensions by only supporting 3.8, I don't agree that making that bridge exist for such a short lifespan is a good idea. Projects like WordPress, Symfony, and Twig (hell, anything led by Fabien Potencier basically) eat a lot of technical debt to not alienate their userbases with major upgrades (in the case of Symfony 3.0 and Twig 2.0 the only remarkable things about those major releases were the removal of some deprecated code, deprecating some legacy layer stuff for the next major version, and bumping their minimum dependencies).

We're talking mostly about class name aliases here, not a functionality bridge. Is it really that expensive to keep that classmap through the lifetime of 4.x to make upgrades for developers and end users a little easier?

avatar Bakual
Bakual - comment - 9 Feb 2017

Please don't try to create 3.8 as a bridge to 4.0. That will not go down well both with extension developers and users.
4.0 will have some legacy code until 5.0. That's completely natural when using SemVer. The only way around that would be to plan forward, and by that I don't mean "Lets see what we want to do in 4.0 and then when implemented backport it into the last previous minor release".

Just keep those classmaps in 4.0. It will not hurt at all.

avatar joomla-cms-bot joomla-cms-bot - change - 10 Feb 2017
Category Administration com_associations com_banners com_cache com_categories com_checkin com_config com_contact com_content com_contenthistory com_fields com_finder com_installer com_joomlaupdate com_languages com_media com_menus com_messages com_modules com_newsfeeds com_plugins com_redirect com_search com_tags com_templates Libraries Unit Tests
avatar laoneo laoneo - change - 10 Feb 2017
Labels Added: ?
avatar laoneo
laoneo - comment - 10 Feb 2017

As it looks like most people agree that we should keep the classmap in J4, I'm totally fine with that.

Why I propose to namespace the whole libraries folder in J3.8? When as extension developer I want to keep the same code base for J3 and J4 then I have always to use the none namespaced core classes, even when we arrive at 3.8.28, two years after 3.8.0 is released. We just have to be clear about that.

That's why I suggest to namespace the libraries folder already in 3.8. We don't even have to change the core extensions to use them in 3.8 (I'v reverted that commit now).

avatar laoneo
laoneo - comment - 10 Feb 2017

I'm saying that, because now we have the situation where we still can namespace and merge it easily into the 4 branch. I guess the opposite will son not be possible.

avatar mbabker
mbabker - comment - 10 Feb 2017

The namespace stuff should most definitely be backported for 3.8. I just don't think the class map should be dropped in 4.0 is all.

avatar wilsonge wilsonge - change - 14 Feb 2017
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-02-14 10:45:23
Closed_By wilsonge
avatar wilsonge wilsonge - close - 14 Feb 2017
avatar wilsonge wilsonge - merge - 14 Feb 2017
avatar wilsonge
wilsonge - comment - 14 Feb 2017

I'm not convinced but clearly in the minority here. Le merged

Add a Comment

Login with GitHub to post a comment