It is critically important to implement tests which run migrations against real databases using doctrine migration.
The idea:
We probably need 2 sets of entities: first in based on integer id and second is based on uuid.
Then it launches the command doctrine:schema:update --force against the first set (so that we can launch it for both mysql and postgres).
And then it launches the id-to-uuid migration. The success would be the command doctrine:migration:migrate doesn't fail and doctrine:schema:validate displays that the schema is in sync (against the second set).
Examples of functional/integration tests:
https://github.com/symfony/twig-bundle/blob/master/Tests/Functional/EmptyAppTest.php
https://github.com/symfony/webpack-encore-bundle/blob/master/tests/IntegrationTest.php
It is critically important to implement tests which run migrations against real databases using doctrine migration.
The idea:
We probably need 2 sets of entities: first in based on integer id and second is based on uuid.
Then it launches the command
doctrine:schema:update --forceagainst the first set (so that we can launch it for both mysql and postgres).And then it launches the id-to-uuid migration. The success would be the command
doctrine:migration:migratedoesn't fail anddoctrine:schema:validatedisplays that the schema is in sync (against the second set).Examples of functional/integration tests:
https://github.com/symfony/twig-bundle/blob/master/Tests/Functional/EmptyAppTest.php
https://github.com/symfony/webpack-encore-bundle/blob/master/tests/IntegrationTest.php