User tests: Successful: Unsuccessful:
JToolbarHelper
is now Joomla\CMS\Toolbar\ToolbarHelper
. This change is necessary to further the adoption of namespaced naming schemes as opposed to the alternative old style.
JSubMenuHelper
class name.JToolbarHelper
class name.JToolbarHelper
to Joomla\CMS\Toolbar\ToolbarHelper
in some arbitrary code and check for any change in behavior.No change in behavior should occur as a result of the outlined testing methodology. The use of JToolbarHelper
should continue to work like normal since it has been aliased to the namespaced edition of the class. The functionality of the namespaced edition of the class should be identical to that of the old version.
Since JToolbarHelper
registered JSubMenuHelper
with JLoader
, administrator/index.php
now requires subtoolbar.php
so that the class can be made available. This was the preferred method of action as opposed to converting it to a namespaced variant since the class is deprecated.
Yes. Any recommendation of JToolbarHelper
should be changed in favor of using Joomla\CMS\Toolbar\ToolbarHelper
.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration Libraries |
Title |
|
Labels |
Added:
?
|
(Also if we do this for 3.9 it should be placed in the Joomla\CMS\Toolbar
namespace as it is in 4.0 so we don't have several instances of the class being renamed between releases)
Some sort of compatibility layer should be available before 4.0 hits so that developers have time to switch to the new namespaced variant of the class name.
4.0 is still supporting all the global class names except those explicitly deprecated for removal in 4.0 (basically some of the early migrated Framework packages or classes that are explicitly deprecated and will be removed). So, there is no need to migrate calls to JToolbarHelper
to the namespaced variant for a while.
While this is true, Joomla 4.0 is a bit far off. If it were being released tomorrow, this would be a non-issue. But, since it isn't, JToolbarHelper
is one of the few classes that you can't find a namespaced variant for when writing an extension.
For developers that are trying to use the new naming scheme exclusively, JToolbarHelper
is a bit of a blemish on that record.
Oh, I agree it should be done. Just pointing out that there is no rush in completely moving over to all namespaced classes, and that even in 4.0 the old class names will work for the most part. Using namespaced classes keeps your IDE from groaning about missing classes (without generating a stubs file), that's probably the biggest benefit right now.
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2018-08-09 12:48:34 |
Closed_By | ⇒ | mbabker | |
Labels |
Added:
?
|
This change is causing issues in 3pd extensions we use.
Warning: require_once(/www/administrator/includes/toolbar.php): failed to open stream: No such file or directory in www/components/com_payplans/xiframework/base/abstract/helper/toolbar.php on line 11
Fatal error: require_once(): Failed opening required 'www/administrator/includes/toolbar.php' (include_path='.:/usr/local/lib/php') in www/components/com_payplans/xiframework/base/abstract/helper/toolbar.php on line 11
Is there any plan to consider this as a B/C breaking change and revert?
Get in touch with the third party developer to have them fix it. It should be as simple as surrounding the require
in a conditional.
Alternatively, take the line out of the file yourself.
On Nov 21, 2018, at 10:01 PM, NickSdot notifications@github.com wrote:
This change is causing issues in 3pd extensions we use.
`Warning: require_once(/www/administrator/includes/toolbar.php): failed to open stream: No such file or directory in www/components/com_payplans/xiframework/base/abstract/helper/toolbar.php on line 11
Fatal error: require_once(): Failed opening required 'www/administrator/includes/toolbar.php' (include_path='.:/usr/local/lib/php') in www/components/com_payplans/xiframework/base/abstract/helper/toolbar.php on line 11`
Is there any plan to consider this as a B/C breaking change and revert?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
It should be as simple as surrounding the
require
in a conditional.
We just use the below command, works with both Joomla older version and latest version
JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR . '/includes/toolbar.php');
That’s quite a bit more elegant than my suggestion!
On Nov 21, 2018, at 11:11 PM, Tuan Pham Ngoc notifications@github.com wrote:
It should be as simple as surrounding the require in a conditional.
We just use the below command, works with both Joomla older version and latest version
JLoader::register('JToolbarHelper', JPATH_ADMINISTRATOR . '/includes/toolbar.php');
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
We've moved this class in 4.0 to the libraries, TBH I don't remember anymore if there's a reason we can't or shouldn't do this for 3.x. // @wilsonge @laoneo