I'm create composer package with type library
. And trying to require it to Symfony2 project.
The package has following composer.json
{
"name": "vendor/package-sdk",
"description": "My private package",
"type": "library",
"license": "MIT",
"autoload": {
"psr-4": {"Vendor\\PackageSDK\\": "src/"}
},
"require": {
"php": ">=5.3.3"
}
}
Then I require it to my SF2 project.
"repositories": [
{
"type": "git",
"url": "[email protected]:me/vendor-package-sdk.git"
},
],
"require": {
...
"vendor/package-sdk": "~0.0.1-alpha1"
...
}
When I calling
use Vendor\PackageSDK\Client;
...
$client = new Client();
```
And I got fatal error:
PHP Fatal error: Class 'Vendor\PackageSDK\Client' not found in /path
If I do
composer dump-autoload -o
It works, but
composer dump-autoload
not.
The file vendor/composer/autoload_psr4.php contain:
'Vendor\\PackageSDK\\' => array($vendorDir . '/vendor/package-sdk/src'),
Could anybody tell me what am I doing wrong?