-
-
Save huglester/3849204 to your computer and use it in GitHub Desktop.
FuelPHP 1.x Composer Support
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add this right after Autoloader::register() in app/bootstrap.php | |
// In this current setup it will read composer packages from fuel/app/vendor, you can change this below | |
// Make sure to also setup your composer.json with the correct path | |
$namespaces = require APPPATH.'vendor/composer/autoload_namespaces.php'; | |
foreach ($namespaces as $namespace => $filepath) | |
{ | |
Autoloader::add_namespace($namespace, $filepath.$namespace.DS, true); | |
} | |
Autoloader::add_classes(require APPPATH.'vendor/composer/autoload_classmap.php'); | |
// and the default composer.json fuel config | |
{ | |
"config": { | |
"vendor-dir": "fuel/app/vendor" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
default composer.json option
{
"config": {
"vendor-dir": "fuel/vendor"
}
}