Description
I'm writing my symfony2 bundle. I created a repository, connected it through the composer and edited it directly in the vendor directory, everything is fine, but new files do not want to connect through the composer autoloader .
Problem:
I noticed that composer writes all my files to vendor/composer/autoload_classmap.php and accordingly if you add a new file there with your hands or make composer update -o then everything is fine. But constantly straining to add.
Question
How can I tell the composer that I have a PSR-4 and let all the files connect automatically, and not statically save to vendor/composer/autoload_classmap.php ?
Here is the autoload in the composer.json project:
... "autoload": { "psr-4": { "": "src/" } }, ... But autoload in composer.json bundle
... "autoload": { "psr-4": { "NameSpace\\MyBundle\\": "../" } } ... With that in vendor/composer/autoload_psr4.php my bundle is there, but apparently the settings are curves, because I have no src directory in the bundle:
... 'NameSpace\\ MyBundle\\' => array($vendorDir . '/namespace'), '' => array($baseDir . '/src'), ...