Feature PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
16 May 2023

Summary of Changes

Our different extension types all have different ways how to find out their own name. A component, language and template could be named after a tag in its manifest or by its name. A module will either use the tag or read the first module attribute to a child of the tag it can find. A file extension will always be named after its manifests filename, a plugin will require you to do the same as for modules, but does not support the tag. Packages expect an element named "packagename", but which is not allowed to contain a pkg_ prefix. Libraries need an element named . Only half of that is documented here: https://docs.joomla.org/Manifest_files

This PR unifies that so that all extensions (except file) support the element tag and, if not present, will fall back to the name. All current behavior is kept and will take precedence over this "new" behavior. All output now is also run through the InputFilter::clean() method.

Testing Instructions

Actual result BEFORE applying this Pull Request

Expected result AFTER applying this Pull Request

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar joomla-cms-bot joomla-cms-bot - change - 16 May 2023
Category Libraries
avatar Hackwar Hackwar - open - 16 May 2023
avatar Hackwar Hackwar - change - 16 May 2023
Status New Pending
avatar Hackwar Hackwar - change - 16 May 2023
Labels Added: PR-5.0-dev
avatar richard67
richard67 - comment - 17 May 2023

@Hackwar Unit tests are failing, see https://ci.joomla.org/joomla/joomla-cms/65798/1/10 :

There were 3 failures:

1) Joomla\Tests\Unit\Libraries\Cms\Installer\Adapter\ModuleAdapterTest::testgetElement1
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'somethingElse'
+'mod_somethingelse'

/drone/src/tests/Unit/Libraries/Cms/Installer/Adapter/ModuleAdapterTest.php:82

2) Joomla\Tests\Unit\Libraries\Cms\Installer\Adapter\ModuleAdapterTest::testgetElement2
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'somethingElse'
+'mod_somethingelse'

/drone/src/tests/Unit/Libraries/Cms/Installer/Adapter/ModuleAdapterTest.php:100

3) Joomla\Tests\Unit\Libraries\Cms\Installer\Adapter\ModuleAdapterTest::testgetElementFromElementTag
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'somethingElse'
+'mod_somethingelse'

/drone/src/tests/Unit/Libraries/Cms/Installer/Adapter/ModuleAdapterTest.php:123
avatar Hackwar Hackwar - change - 1 Jul 2023
Labels Added: Feature
avatar HLeithner
HLeithner - comment - 30 Sep 2023

This pull request has been automatically rebased to 5.1-dev.

avatar Hackwar Hackwar - change - 22 Mar 2024
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2024-03-22 10:49:55
Closed_By Hackwar
avatar Hackwar Hackwar - close - 22 Mar 2024
avatar Hackwar Hackwar - change - 22 Mar 2024
Status Closed New
Closed_Date 2024-03-22 10:49:55
Closed_By Hackwar
Labels Added: PR-5.1-dev
avatar Hackwar Hackwar - change - 22 Mar 2024
Status New Pending
avatar Hackwar Hackwar - reopen - 22 Mar 2024
avatar Hackwar Hackwar - change - 3 Apr 2024
Labels Removed: PR-5.0-dev
avatar HLeithner
HLeithner - comment - 24 Apr 2024

This pull request has been automatically rebased to 5.2-dev.

avatar HLeithner HLeithner - change - 24 Apr 2024
Title
[5.0] Unifying InstallAdapter::getElement()
[5.2] Unifying InstallAdapter::getElement()
avatar HLeithner HLeithner - edited - 24 Apr 2024
avatar HLeithner
HLeithner - comment - 2 Sep 2024

This pull request has been automatically rebased to 5.3-dev.

avatar HLeithner HLeithner - change - 2 Sep 2024
Title
[5.2] Unifying InstallAdapter::getElement()
[5.3] Unifying InstallAdapter::getElement()
avatar HLeithner HLeithner - edited - 2 Sep 2024
avatar Hackwar Hackwar - change - 26 Nov 2024
Labels Added: PR-5.3-dev
Removed: PR-5.1-dev

Add a Comment

Login with GitHub to post a comment