Vendor() function basically used to load third party library in CakePHP. This function have been deprecated in the recent CakePHP releases.  The vendor function in earlier CakePHP releases has been replace with new App::import method that is more user friendly and allow you to include third party library in several ways.

To fix the issue simply replace vendor function with new method.  New import method return boolean true or false depend on the library loaded or not.  This is useful in some context.  With new import method you have option to verify third party library loading and act accordingly so your application never fail.

Old Method

[php]vendor(‘facebook/facebook’);[/php]

New Method

[php]App::import(‘Vendor’, ‘facebook/facebook’);[/php]

Written by Bala Krishna

Bala Krishna is web developer and occasional blogger from Bhopal, MP, India. He like to share idea, issue he face while working with the code.

This article has 2 comments