Skip to content

Automatize plugins composer autoloader registration #76

Description

@cedric-anne

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Plugins ecosystemPlugin framework, compatibility and ecosystem support.

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions