This class has the goal of automatically merge all autoload and vendor. Ideal for those who organize your project in plugins, modules, extensions, etc., (*1)
It was extracted from the OctoberCMS project core and adapted to work without the platform., (*2)
You can use this class both standalone and via composer package composer require prhost/composer-vendor-merge
, (*3)
Install the package, (*4)
composer require prhost/composer-vendor-merge
, (*5)
Instance and init the classe, (*6)
$manager = new Prhost\ComposerMergeVendor(); $manager->init();
Adds other vendor by project, (*7)
//Other vendor $manager->addVendor(__DIR__ . '/path/to/other/vendor');
Require the classe, (*8)
require_once 'src/ComposerMergeVendor.php';
Instance and init the classe, (*9)
$manager = new Prhost\ComposerMergeVendor(); $manager->init();
Adds other vendor by project, (*10)
//Other vendor $manager->addVendor(__DIR__ . '/path/to/other/vendor');