Pico::loadComposerPlugins(): Use Pico::getVendorDir() instead of Pico::$vendorDir

This commit is contained in:
Daniel Rudolf 2017-06-14 17:43:23 +02:00
parent 23ad80b98a
commit 21051fe08b
No known key found for this signature in database
GPG key ID: A061F02CD8DE4538

View file

@ -570,12 +570,12 @@ class Pico
protected function loadComposerPlugins()
{
$composerPlugins = array();
if (file_exists($this->vendorDir . 'vendor/pico-plugin.php')) {
if (file_exists($this->getVendorDir() . 'vendor/pico-plugin.php')) {
// composer root package
$composerPlugins = require($this->vendorDir . 'vendor/pico-plugin.php') ?: array();
} elseif (file_exists($this->vendorDir . '../../../vendor/pico-plugin.php')) {
$composerPlugins = require($this->getVendorDir() . 'vendor/pico-plugin.php') ?: array();
} elseif (file_exists($this->getVendorDir() . '../../../vendor/pico-plugin.php')) {
// composer dependency package
$composerPlugins = require($this->vendorDir . '../../../vendor/pico-plugin.php') ?: array();
$composerPlugins = require($this->getVendorDir() . '../../../vendor/pico-plugin.php') ?: array();
}
foreach ($composerPlugins as $package => $classNames) {