json - Composer does not generate autoloader information (autoload_namespaces.php) -


i have trouble getting project correctly installed through composer. have own custom package (library) hosted in non public git repo (but centralized) fetched composer (dummy project containing composer.json testing package).

so structure that:


/test/project/composer.json               index.php 

content of composer.json:

{     "name": "vendor/test",     "description": "test-description",     "authors": [{         "name": "benjamin carl",         "email": "email@testdomain.com",         "homepage": "http://www.testdomain.com",         "role": "developer"     }],     "keywords": [         "foo",         "bar"     ],     "homepage" : "http://www.testdomain.com/",     "license" : [         "the bsd license"     ],     "repositories": [{         "type": "package",         "package": {             "name": "foo/bar",             "version": "0.0.1",             "source": {             "url": "git@git.testdomain.local:benjamin.carl/bar.git",                 "type": "git",             "reference": "master"     }         }     }],     "require": {         "foo/bar": "0.0.1"        } } 

so when run composer install "php composer.phar install" within folder containing test-project , composer.json see above - seems fine - - autoloader information missing - map (array) in "autoload_namespaces.php" (files getting generated) keeps empty.

i assumed when install package composer , package (in case package foo/bar) contains composer.json file - file executed/processed during installation , information autoloading taken (package) composer.json file. right? or doing wrong?


here content of "composer.json" file package foo/bar:

{     "name": "foo/bar",     "description": "foo - project bars out there.",     "authors": [{         "name": "benjamin carl",         "email": "email@testdomain.com",         "homepage": "http://www.testdomain.com",         "role": "developer"     }],     "keywords": [     "php",         "foo",     "bar",         "baz"     ],     "homepage": "http://testdomain.com/",     "license": [         "the bsd license"     ],     "require": {         "php": ">=5.3.0"     },     "autoload": {         "psr-0": {         "foo": "framework/"     }     },     "include-path": ["framework/"],     "support": {         "email": "email@testdomain.com",         "issues": "https://testdomain.com/issues",     "wiki": "https://testdomain.com/wiki"     },     "repositories": [{         "type": "vcs",     "url": "https://git.testdomain.local/test/bar.git"     }] } 

as result of configuration(s) above want autoloading information this:

$data = array(     'foo' => $vendordir . '/foo/bar/framework' ); 

if insert line "'foo' => ..." manually works fine. can't figure out why information isn't written composer "autoload_namespaces.php" file.

thanks :)

if try install private library/package via "repositories" node of composer.json have re-specify "autoload" node apparently.

{   "repositories": [{     "type": "package",     "package": {       "name": "foo/bar",       "version": "0.0.1",       "source": {         "url": "git@git.testdomain.local:benjamin.carl/bar.git",         "type": "git",         "reference": "master"       },       "autoload": {         "psr-0": {         "foo": "framework/"       }     }   }] } 

i spent couple of hours figuring out. job, composer!


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -