I use a custom repository in github in the project that contains my toolbox.
The project correctly imports the package inside the / vendor directory, but I cannot use any class because it does not load the contents of the package.
My batch file composer.json looks like this:
{ "name": "mynamespace/toolbox", "description": "Asdfoobar.", "keywords": ["mynamespace", "toolbox"], "license": "MIT", "require": { "php": ">=5.4" }, "require-dev": { "codeception/codeception": "2.0.2", "codeception/specify": "0.3.6", "codeception/verify": "0.2.7", "mockery/mockery": "0.9.1" }, "autoload": { "psr-4": { "Mynamespace\\": "src/Mynamespace", "Mocks\\": "tests/Mocks" } }, "scripts": { "post-install-cmd": [ ], "post-update-cmd": [ "php vendor/bin/codecept run" ] }, "config": { "preferred-install": "dist" }, "minimum-stability": "stable"
}
Inside the project, the composer.json file looks like this:
"require": { [...stuff...] "Mygitrepo/toolbox": "dev-master" }, "repositories": [ { "type": "package", "package": { "name": "Mygitrepo/toolbox", "version": "master", "source": { "url": "https://github.com/Mygitrepo/toolbox.git", "type": "git", "reference": "master" } } } ]
The final autoload_psr4.php file after performing the composer update, the linker dump looks like this: No trace of "Mynamespace"
return array( 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'), 'Ivory\\LuceneSearchBundle\\' => array($vendorDir . '/egeloen/lucene-search-bundle'), 'Facebook\\' => array($vendorDir . '/facebook/php-sdk-v4/src/Facebook'), );
Any help?