Requires glpi-project/glpi#22465 to be finished.
Currently, a PSR-4 autoloader is automatically registered when a plugin is loaded. Instead, we should directly include the plugin vendor/autoload.php file. This would delegate to the plugin the PSR-4 autoloader declaration/configuration, and give the ability to choose their own directory structure. Also, it would ease the handling of vendor libs in the plugins, by removing the requirement to manually include this file, and could prevent unexpected side effects when this inclusion is made at an unexpected moment.
Current PSR-4 autoloader registration is located here: https://github.com/glpi-project/glpi/blob/8f980ba4e10a85bf00de413ace73742f21121ee4/src/Plugin.php#L403-L410
Requires glpi-project/glpi#22465 to be finished.
Currently, a PSR-4 autoloader is automatically registered when a plugin is loaded. Instead, we should directly include the plugin
vendor/autoload.phpfile. This would delegate to the plugin the PSR-4 autoloader declaration/configuration, and give the ability to choose their own directory structure. Also, it would ease the handling of vendor libs in the plugins, by removing the requirement to manually include this file, and could prevent unexpected side effects when this inclusion is made at an unexpected moment.Current PSR-4 autoloader registration is located here: https://github.com/glpi-project/glpi/blob/8f980ba4e10a85bf00de413ace73742f21121ee4/src/Plugin.php#L403-L410