# Two versions running at the same time

**URL:** <https://discourse.slimframework.com/t/two-versions-running-at-the-same-time/5642>\
**Category:** Migration\
**Created:** [June 28, 2023, 10:19am UTC](https://discourse.slimframework.com/t/two-versions-running-at-the-same-time/5642 "2023-06-28T10:19:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![xavier.dosil](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/xavier.dosil/32/1548_2.png) [@xavier.dosil](https://discourse.slimframework.com/u/xavier.dosil)\
**Post date:** [June 28, 2023, 10:19am UTC](https://discourse.slimframework.com/t/two-versions-running-at-the-same-time/5642/1 "2023-06-28T10:19:29Z")

</div>

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/user/)…  
[https://domain.com/v4/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,

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [June 28, 2023, 11:17am UTC](https://discourse.slimframework.com/t/two-versions-running-at-the-same-time/5642/2 "2023-06-28T11:17:50Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![xavier.dosil](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/xavier.dosil/32/1548_2.png) [@xavier.dosil](https://discourse.slimframework.com/u/xavier.dosil)\
**Post date:** [June 28, 2023, 12:15pm UTC](https://discourse.slimframework.com/t/two-versions-running-at-the-same-time/5642/3 "2023-06-28T12:15:24Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [June 28, 2023, 4:29pm UTC](https://discourse.slimframework.com/t/two-versions-running-at-the-same-time/5642/4 "2023-06-28T16:29:53Z")

</div>

I guess this is not possible, because [Composer](https://getcomposer.org/doc/articles/versions.md) does not allow multiple versions of the same dependency (at the same time).

---

<div class="post-metadata">

**Author:** ![xavier.dosil](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/xavier.dosil/32/1548_2.png) [@xavier.dosil](https://discourse.slimframework.com/u/xavier.dosil)\
**Post date:** [June 29, 2023, 7:01am UTC](https://discourse.slimframework.com/t/two-versions-running-at-the-same-time/5642/5 "2023-06-29T07:01:55Z")

</div>

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

Thanks!

---

<div class="post-metadata">

**Author:** ![odan](https://avatars.discourse-cdn.com/v4/letter/o/9de053/32.png) [@odan](https://discourse.slimframework.com/u/odan)\
**Post date:** [June 29, 2023, 3:38pm UTC](https://discourse.slimframework.com/t/two-versions-running-at-the-same-time/5642/6 "2023-06-29T15:38:51Z")

</div>

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