Offer to work as all the rules guys
- Create a folder controllers /V2/ (or/and add V2 to the name of the controller for easy search in the IDE)
- Configure the prefix for all of these controllers
/v2
one line in the ranting (or if the annotation -- ask them to specify the prefix)
Doc:
Route Groups and Prefixes¶
Not mudkats with kveri-parameter
Such opportunities at your fingertips what you are thinking there as in zero?!
Well, it certainly is, if you are in the controllers of shit not piled, if done cleanly -- the controller as raskhodka,
controller + a couple of DTO to the desired version
UPD from
@graciela:
It is not necessary to use the JMS serializer or Symfony Serializer with annotations for entities. For responses you can use regular DTO-shki or fractal.
The API Doc is comfortable to write with https://github.com/bukalapak/snowboard
Or concept of change.
What then?
This model will no longer meet the requirements, even if we normal guys. - samantha.Hue commented on April 19th 20 at 12:35
Depends on the policy of backwards compatibility.
Compliant code will have to write a certain way, adding a new feature, is necessary to maintain compatibility with old (or not combine) - Cleve commented on April 19th 20 at 12:38
example
There is a functional products with one picture. product
Now in version 2 you added a new functionality "all images" item
When you added this option, it became clear that the picture from the table of goods dead weight, maybe they're still there in the table of images, where several of them...
Then you rewrite the code so that data from the provider came from a new table, but in an ATT to version 1 returned the first picture...
If you are beginning to overlap/conflict of functionality -- there are different mistke and classes will help you, it is not so difficult and quite comfortable - Cleve commented on April 19th 20 at 12:41
The API Doc is comfortable to write with https://github.com/bukalapak/snowboard - graciela commented on April 19th 20 at 12:44
User and Account be vastly different.
As we understand this table in the database.
users
accounts
If you want to exclude the entity in the next release.
Here is a reasonable question.
Why do we need a users table in v2? - samantha.Hue commented on April 19th 20 at 12:50
I want to note that "version 2" -- this in the same app, where is v1
In v2 so this table will not be used, and if the replacement for nick in the accounts, for v1 you need to make tranformation to go to the ATT came data from accounts - Cleve commented on April 19th 20 at 12:53
But what if in version 2 we it is unnecessary, and in 1 version should not break. - samantha.Hue commented on April 19th 20 at 12:56
It
- samantha.Hue commented on April 19th 20 at 13:05
data controllers will arrive via an ATT-shki and transformers, and the logic of their creation and the data source is already set as it should - Cleve commented on April 19th 20 at 13:14
ProductControllerV2.php - Cleve commented on April 19th 20 at 13:17