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
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
@Hackwar Unit tests are failing, see https://ci.joomla.org/joomla/joomla-cms/65798/1/10 :