php - Adding a library to Composer in Symfony 2.1+ -


i'm trying add libraries composer.json

the libraries located @ symfony/vendor/foo/lib/foo/*

before loaded them under registernamespaces method in autoload.php as:

... 'foo' => __dir__.'/../vendor/foo/lib', ... 

i have tried adding them "foo": "*" , "foo/foo": "*" in composer.json no avail. documentation seems extremely lacking in regard.

you have @ composers documentation, because autoloading taken on there. start update ones symfony 2.0 application i've used compare against current symfony standard. problem should have @ app/autoload.php. there can find

$loader = @include __dir__.'/../vendor/autoload.php' 

in line 5 (within if-expression, thats not important here). means, long let composer install packages don't have take autoloading anymore. of course must call php composer.phar install first. if don't know name of package, have @ packages composer.json-file, or search @ packagist


Comments

Popular posts from this blog

JQuery Autocomplete without using label, value, id -

c++ - Accessing inactive union member and undefined behavior? -

JAVA - what is the difference between void and boolean methods? -