CakePHP 3 - Vendors

1

How do I import a vendor into cakephp3?

I tried it like this:

require_once(APP . 'Vendor' . DS  . 'Dailymotion' . DS . 'Dailymotion.php');

but it returns me the error:

Fatal error: require_once() [function.require]: Failed opening required '/var/www/Projeto/src/Vendor/Dailymotion/Dailymotion.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/Projeto/src/Controller/EpisodesController.php on line 15
    
asked by anonymous 16.05.2015 / 07:21

1 answer

1

As of version 3, the Vendor directory has been moved to the ROOT of the application. You can set a constant in bootstrap.php to the vendor directory, as this constant is no longer standard in the version.

define('VENDOR', ROOT . DS . 'vendor' .DS);

And call:

 require_once(VENDOR . 'Dailymotion' . DS . 'Dailymotion.php');
    
18.05.2015 / 17:14