Details
-
Type: Patch
-
Status: Done/Fixed
-
Priority: Important
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.21
-
Fix Version/s: 4.7.23
-
Component/s: Core CiviCRM
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Funding Source:Contributed Code
-
Verified?:No
-
How it works currently:Two extensions using the same PSR-4 prefix will only allow classes from one to be autoloaded.
-
How it should work:Multiple extensions can use the same PSR-4 prefix.
Description
-- added support for PSR-4 autoloading in extensions. It uses the "setPsr4" method, whichCRM-17957
Registers a set of PSR-4 directories for a given namespace, replacing any others previously set for this namespace.
This means that if two extensions use the same prefix only the last added will be used. For example both APIv4 and CiviCase use the "Civi\" prefix, and in my case the APIv4 classes were not autoloaded.