I'm working on 2 applications right now. The first one is a CMS, and the second is a shop. I want to move my vendor one level above and the share it between projects.
So my structure will be something like this:
project1/
project2/
shared_vendor/
I read about this.
I have changed the app/autoload.php
loader variable from:
$loader = require __DIR__.'/../vendor/autoload.php';
to:
$loader = require __DIR__.'/../../vendor/autoload.php';
And I have also changed vendor-dir
in my composer.json
from:
"config": {
"bin-dir": "bin",
"vendor-dir": "vendor"
},
to:
"config": {
"bin-dir": "bin",
"vendor-dir": "/../vendor"
},
And after this I'm getting this error:
ClassNotFoundException in AppKernel.php line 20: Attempted to load
class "CmsUserBundle" from namespace "CmsUserBundle".
Did you forget a "use" statement for another namespace?
What am I doing wrong? Did I forget to change something?
Thanks in advance.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…