K
K
KakoyToParen2018-07-21 18:54:16
Yii
KakoyToParen, 2018-07-21 18:54:16

Implementation of versioning in Yii2. How to automate?

Good afternoon.
I decided to deal with the versioning of the API in Yii2. As I understand it, we create the v1 module, then copy it and rename it to the v2 module.
The folder structure turns out to be
site/modules/v1/...
site/modules/v2/...
After copying, you have to flatter the code of each class and change the namespace .
How can this be automated? In addition to the banal change of lines in files using php.
And if this is the only way, then how to search in the namspace file without knowing what line it is on?
And are there examples of implemented versioning on github?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2018-07-21
@webinar

After copying, you have to flatter the code of each class and change the namespace .
How can this be automated?

any ide will do it, banal autocorrect

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question