I'm using symfony 2.1 and I want to add a library to vendors. The library do not exists in packagist. I can't manage it with composer. When I install bundles or others vendors through composer, it manage autoload for me. But where to register autoload when the vendor is not managed with composer?
相关问题
- How to install an extension to TYPO3 using compose
- PHP trying to send mail securely - cannot find the
- Error Installing Laravel: Mcrypt PHP extension req
- Composer Use Github Before Packagist
- what a part does bower/bower-asset play in php app
相关文章
- Security concerns with using Composer Install in p
- How to uninstall Laravel Passport
- Composer error with GitHub OAuth token on fresh la
- Composer unable to run post install script
- Symfony Form Class: rename fields name attribute
- Multiple Composer Installs with (Independent) Modu
- Role Interface and Manage Roles
- How do I get PEAR.php with Composer?
You just need to modify your composer.json file for the autoload value:
http://getcomposer.org/doc/04-schema.md#autoload
And then in your controller for example:
You should be able to use Composer for registering vendor libraries not available via packagist. I'm not entirely sure, but this should work fine:
You can add libraries to composer that are not in packagist. You must add them in the
repositories
array of yourcomposer.json
file.Here's how to load a github repository that has a composer.json file, even though it's not on packagist (for example a fork you would have done to fix a repository) : http://getcomposer.org/doc/02-libraries.md#publishing-to-a-vcs
And here's how to load a library that's on a git/svn repository, or a zip file : http://getcomposer.org/doc/05-repositories.md#types
An example using various possibilities: