Two versions running at the same time

Hello all,

I’m newbe with Slim. Nowadays, in our company have a v3 running, and we need migrate to v4, but, we want to both versions will run at the same time… like:
https://domain.com/user/
https://domain.com/v4/user/

This option is because, bit by bit, we will be migrating some services that are calling actual version to new version.

How can we make an installaton with this option? I hope I have explained myself correctly.
Thanks for your help.

Regards,

Hi! I have a question.

Are you planning to add a version number to your API endpoints or are you planning to run Slim 3 and Slim 4 in parallel, but with different routes?

Hi odan,

I’m planning run in parallel with different route because, we don’t want to change the actual route for the v3, and only create a new route for v4.

Thanks for your replay

Regards

I guess this is not possible, because Composer does not allow multiple versions of the same dependency (at the same time).

It’s just what i thought. I guess the solution is to install in different folder, isn’t it?

Thanks!

I would assume yes, because this would need a new “project” with its own composer.json file, vendor directory, autoloader etc…