kirby-chunky icon indicating copy to clipboard operation
kirby-chunky copied to clipboard

Use @include_once to load plugins composers dependencies.

Open ovenum opened this issue 1 year ago • 1 comments

Closes #2

When installing Kirby with composer getkirby/composer-installer takes care of installing the plugins composer dependencies into the main composer vendor directory.

You can the check the the Kirby Plugin guide for further information on how to setup the plugin to support different installation methods.

Note that you should not require the autoloader, as it will only be present if the plugin is installed manually or via a Git submodule. Our custom Composer installer will delete the vendor directories from plugins to avoid code duplication and autoloading issues. By using @include_once, you tell PHP to load the file only if it exists.

ovenum avatar May 03 '23 08:05 ovenum