Background
I'm developing a series of websites which share a common engine. Something very similar to StackExchange's network of websites. Every webiste is a separate Symfony2 installation on a different Git repository, with a dependency to the engine, which is also placed on a separate repository.
"requires": {
...
"my-platform/core": "dev-master"
}
I'm still in the early stage of development, so I'd like not have to use composer update
everytime I change something in the core repository. It seems that Composer has a right tool to solve this problem but it doesn't want to work properly.
My directory structure:
Workspace
MyPlatformCore
src
MyPlatform
Core
SomeClass.php
composer.json
MyWebsiteAAA
app
src
vendor
web
composer.json
MyWebsiteBBB
app
src
vendor
web
composer.json
Autoload section from composer.json
from every MyWebsiteXXX
repository:
"autoload": {
"psr-0": {
"MyPlatform": "../MyPlatformCore/src"
}
},
Problem
If i run php composer.phar dumpautoload --optimize
from MyWebsiteXXX
it generates files of autoloader with wrong paths. File vendor/composer/autoload_classmap.php
contains:
'MyPlatform\\Core\\...' => $vendorDir . '/myplatform/core/src/MyPlatform/Core/...php',
while it should contain:
'MyPlatform\\Core\\...' => $vendorDir . '/../MyPlatformCore/src/MyPlatform/Core/...php',
P.S. Workspace\MyPlatformCore
is in fact a symlink, but it should matter, isn't it?