No Code Attached Yet J4 Issue
avatar wilsonge
wilsonge
14 Jun 2019

#19870 namespaced ContentHelperRoute. However I still feel that this is wrong because 3PD extensions have no way of adding entries into the extensions mapper file. This file should be something that we use to allow other extensions to function who extended non-namespaced classes.

So this should probably be put in the extensions container in some way.

avatar wilsonge wilsonge - open - 14 Jun 2019
avatar joomla-cms-bot joomla-cms-bot - change - 14 Jun 2019
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 14 Jun 2019
avatar SharkyKZ
SharkyKZ - comment - 14 Jun 2019

3PD extensions have no way of adding entries into the extensions mapper file

It's meant for core extensions, according to the comment inside it.

Why not just leave components/com_content/helpers/route.php and have it extend the namespaced class. Like in com_contact. Deprecate the old classes for 5.0. The "lowercase folders in core with classes" question is hardly an issue, IMO.

avatar franz-wohlkoenig franz-wohlkoenig - change - 15 Jun 2019
Labels Added: J4 Issue
avatar franz-wohlkoenig franz-wohlkoenig - labeled - 15 Jun 2019
avatar franz-wohlkoenig franz-wohlkoenig - change - 15 Jun 2019
Status New Discussion
avatar laoneo
laoneo - comment - 15 Jun 2019

Why do 3PD extensions need to add entries to the mapper file? This is only because ContentHelper is used widely in the eco system so it would crash many extensions. To be fair here, we did it only for good will as we do not have to keep BC for core extensions or I'm wrong?

avatar wilsonge
wilsonge - comment - 15 Jun 2019

It's not about people using the ContentRouter file. That's fine as it is I think. There's a class alias anyhow.

But other 3rd party components will have their own router helper files probably and I don't see many places where this components/3rd party modules are different to other extensions (e.g. virtuemart or any component with a 3rd party module ecosystem etc).

avatar HLeithner
HLeithner - comment - 16 Jun 2019

Shouldn't 3rd party components register the route helper while component booting or in a plugin?

avatar wilsonge
wilsonge - comment - 16 Jun 2019

Well not when the components booting because you don’t wanna boot the component for smart search for example. But the auto loader doesn’t depend on that anyway.

I guess it can be loaded by the auto loader as things are. The point is any 3rd party stuff integrating won’t have the luxury of a class alias which I guess isn’t so disastrous. But certainly isn’t optimal either.

avatar HLeithner
HLeithner - comment - 16 Jun 2019

Doesn't the autoloader is able to load Component<componentname>\Site\Helper\RouteHelper automatically?

avatar brianteeman
brianteeman - comment - 16 Jun 2019

We really shouldnt be treating extensions any differently to core components. If extensions have limitations then it really defeats the point of creating an extendable system

avatar Hackwar
Hackwar - comment - 28 Dec 2020

So, 1.5 years later little has changed here. My personal oppinion is, that there is no need to change what we have right now. The alias is only there for convenience right now and we will drop that in 5.0 anyway. I would rather look at coming up with an improved component concept then, than working on this now further. Can we close this issue here?

avatar wilsonge
wilsonge - comment - 31 Dec 2020

Well there's no point in working on it for J5. The point is if 3rd party extensions move to our "recommended" namespaced map then they have a hard b/c break with any extensions using their router helpers when they namespace

avatar gostn
gostn - comment - 31 Dec 2020

should be moved to ´discussion´

avatar alikon
alikon - comment - 12 Nov 2022

ok i'll move it to discussion

avatar alikon alikon - change - 12 Nov 2022
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2022-11-12 08:47:47
Closed_By alikon
Labels Added: No Code Attached Yet
Removed: ?
avatar alikon alikon - close - 12 Nov 2022

Add a Comment

Login with GitHub to post a comment