satis

Where to register autoload when the vendor is not managed with composer in Symfony 2.1?

£可爱£侵袭症+ 提交于 2019-12-02 23:10:58
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? You can add libraries to composer that are not in packagist. You must add them in the repositories array of your composer.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) :

Composer Not Generating Autoloads For Library

我怕爱的太早我们不能终老 提交于 2019-12-01 03:06:17
I've set up two projects, an 'init' and a library, which is required by the init. They both have PSR-0 autoloads set, but the autoload values from the library are not added to the vendor/composer/autoload_namespaces.php in the init project. Sample composer.json from the Library: { "name": "lxp/library", "description": "A test library", "autoload": { "psr-0": { "LXP\\Library": "src/" } } } Sample composer.json from the project that requires that library: { "name": "lxp/init", "name": "A test init", "autoload": { "psr-0": { "LXP\\Init": "src/" } }, "repositories": [ { "type": "composer", "url":