Central server cakephp lib location

Hi, eventually getting around to moving from 2.x to 3.x and first question is …

Can I install CakePHP into a central shared location on our server and reference it by changing CAKE_CORE_INCLUDE_PATH in /config/paths.php like I do with 2.x?
https://book.cakephp.org/2.0/en/installation/advanced-installation.html

This works great as I just run git pull on a version of CakePHP and it updates Cake for multiple sites at once.

I’ve just used composer to install CakePHP 3.8 and not sure how nicely composer will play with this central idea as there’s a lot of extra vendor folders now.

Anyone know if I can get this working in a similar fashion?

Cheers, Paul.

Composer likes to put vendor files, which would include all of CakePHP, under the /vendor folder. You could probably put them somewhere else, but that’s going to mess with not only composer but Cake’s autoload functionality. I’ve had success running a single installation of a CakePHP application across multiple domains (with different themes and database configuration), but that setup preserves the relative location of CakePHP wrt the application implementation.

So it looks like I should stick with each app having it’s own copy of the /vendor folder so as not to mess with autoload etc.

It’s not the end of the world, but a shame as really handy for updating multiple projects when having a centralised copy of CakePHP (and it’s dependancies).

On the other hand, it means that you can easily update the dependencies for just one, should the need arise.