Cakephp 3 - Vendors

Asked

Viewed 179 times

1

How do I import a vendor into cakephp3?

I tried it this way:

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

1 answer

1


Starting with version 3, the Vendor directory has been moved to the application’s ROOT. You can set a constant in bootstrap.php for the vendor directory, since this constant is no longer standard in the version.

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

And call:

 require_once(VENDOR . 'Dailymotion' . DS . 'Dailymotion.php');

Browser other questions tagged

You are not signed in. Login or sign up in order to post.