Managing 3rdparty library dependencies for Apps


I am developing an app which depends on some 3rd party php library. What is the recommended way to manage my apps dependencies with Composer? I want my apps dependency to be self-contained within the app directory hierarchy ( for example the composer vendor/ directory be inside my app directory) so that apps dependencies do no leak in to global or any wider scope.


That should be no problem at all. Just install your composer dependencies to vendor and include the composers autoload.php file in your app.

You can check out the mail app which also uses composer: