Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Composer in fuelphp 1.2+
  • Hello, i'm trying to install composer into fuelphp 1.2 and, i have notice the vendor folder in the app. I have install composer on the app folder, and now, i don't know how to include the autoloader.php in the public/index.php file. But the autoload not working, i suppose it's a conflit with the fuelphp autoloader. Any idea ? Thank You
  • There is no need for a special autoloader, if the composer packages you want to install are PSR-0 compliant. Just use
    Autoloader::add_namespace('vendor/namespace', APPPATH.'vendor/package', true);
    
    to map the packages namespace to the path you've installed the package in.
  • Ok, the best pratice is to add the autoloader in the app/bootstrap.php file ? Thank you.
  • Probably the best location for it, yes.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion