User tests: Successful: Unsuccessful:
Pull Request for Issue #9523
Before this pull request, if the class that Joomla was trying to load only contains a capital word except the prefix, the autoloader method duplicates that word, so it forces to have a folder on the root of the path where the prefix is pointing to. Now it tries to search on the root the path a PHP file called the same as the capital word on lowercase, if it does not find it, it works as before, making this patch backwards compatible.
In order to test this patch, you need to use a component that has a class on the root of the folder and register a prefix on that folder, for example, com_test and the class would be called TestClass and it will be implemented on class.php. In order to test backwards compatibility, you can put that class on a folder call class inside of com_test folder.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Can you take a look at fixing the code style error please
FILE: /home/travis/build/joomla/joomla-cms/libraries/loader.php
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
605 | ERROR | Expected "if (...)\n"; found "if(...)"
@brianteeman Thanks for point that out. I have solved that issue
I have created this component using Component Creator.
http://www.filedropper.com/comtest-100_2
You just need to go to the front-end of your Joomla installation and trying to execute a controller task called test (/index.php?option=com_test&task=classes.test). If you see a message, it means the patch is working as intended. Try other component to detect the patch is backwards compatible.
Thank you
Category | ⇒ | Libraries |
Rel_Number | 0 | ⇒ | 9523 |
Relation Type | ⇒ | Pull Request for |
@vistiyos Please merge vistiyos#1 as it adds unit test coverage for the new behavior and validates the current behavior does not break.
With that PR applied, testing also becomes much easier. Without this patch, JFactory
has to be explicitly loaded in the libraries bootstrap because it doesn't meet the folder/file structure required right now. With this patch applied, it is autoloaded.
Labels |
Added:
?
|
I have tested this item successfully
Any news about this? The patch passes unit tests, so I don't know if it can be merged.
I have tested this item successfully on 07dd724
Thanks.
Status | Pending | ⇒ | Ready to Commit |
RTC. Thanks
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-05-07 14:25:33 |
Closed_By | ⇒ | wilsonge |
Labels |
Removed:
?
|
It would really help people to test this if you could provide a sample component thy can test with