Skip to content

Instantly share code, notes, and snippets.

@huglester
Forked from tomschlick/gist:3812085
Created October 7, 2012 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save huglester/3849204 to your computer and use it in GitHub Desktop.
Save huglester/3849204 to your computer and use it in GitHub Desktop.
FuelPHP 1.x Composer Support
// 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"
}
}
@huglester
Copy link
Author

default composer.json option

{
"config": {
"vendor-dir": "fuel/vendor"
}
}

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