I tried autoloading php sdk using psr 4 autoloading with composer. I keep getting a class not found error. In fact I can't seem to be able to use any packages from the vendor directory, regardless of how I want to load them. I must be missing something as in Laravel 4, I use the php sdk using autoloading in composer and it works perfectly. Please help.
Ok so here is how I understand it should work.. Correct me if I am wrong:
add dependency for external package in composer.json
add path to package in psr4 autoload section such as "Facebook\": "/vendor/facebook/php-sdk-v4/src/Facebook"
use facebook in the application like use \Facebook\Facebook
Now this works and it seems there is an issue with PHP SDK from facebook as FB released a v5 of their php sdk but the pacakge still says v4 to confuse everyone.
You don't have to add the path to package in PSR4 Autoload section. It will automatically be loaded when you use it in your app folder somewhere. (or any other class autoloaded inside composer.json)