Closed binsky08 closed 11 months ago
Unfortunately I had to revert this change, as it introduces unexpected behavior and fatal errors when a Module loads old versions of libraries. For example if the Module (or CakePHP plugin) uses an old version of CakePHP you run into PHP fatal error messages like this:
'Unknown method "selectQuery" called on App\\Model\\Table\\AgentchecksTable'
hmm, that's not the expected behaviour xD
But is there any other way to psr4 autoload plugin dependencies? Or more general, is there a way to use plugin (composer) dependencies that are not already loaded by the core?
The PluginManager.php does not respect the plugins composer.json autoload section. Instead it injects only the module namespace in a hardcoded way (and expect it to be in /src). see line 86-89:
Maybe something like parsing the plugins composer.json autoload section and using that $loader->setPsr4 for every autoload entry?
Looks good to me, thanks!