I'm currently using Zend 3 for a project (or a range of projects). In order to avoid multiple vendor folders per project, I'd like to have ONE vendor folder at root level that every project runs from.
In my application /public/index.php file, I have changed this line:
include __DIR__ . '/../vendor/autoload.php';
to this:
include __DIR__ . '/../../shared/vendor/autoload.php';
When I did this, I saw this error:
Fatal error: Uncaught exception 'Zend\ModuleManager\Exception\RuntimeException with message Module (Application) could not be initialized. in C:\Users\b28934\Documents\server\UwAmp\www\zf3\app\vendor\zendframework\zend-modulemanager\src\ModuleManager.php on line 203"
Any suggestions? Is there something I'm missing in my composer.json file?
vendorfolder for all projects. Drive space is cheap nowadays. I see definitely no reason.vendorfolder, because it would fail if you had 2 projects which require the same package but in different versions.I suggest keep it simple. Keep it like it is designed by smart people. And don't try to mess it up for no reason.