-
-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
!!! TASK: Update Doctrine Migrations to 3.0 #1880
!!! TASK: Update Doctrine Migrations to 3.0 #1880
Conversation
@kdambekalns Would you like me to go over this for doctrine/orm 2.2.* ? |
8c07dd5
to
c2eb3a3
Compare
D'oh, now we have Doctrine Migrations 3.x (https://www.doctrine-project.org/2020/04/10/doctrine-migrations-3.0.html) - see #2026. We might also need to update doctrine/common with this #2021, though it's still supposed to be phased out. So maybe we can even just get rid of it? |
I'll look into this (again), now that we have 7.0 coming it seems worth it! 💪 |
Can we still get this in for 7.0? |
Good question… sorry, I didn't get around to it. @jonnitto Is the RM to ask, I guess. What are your thoughts, worth working on it today? |
These command are available and need to be working (again):
|
Woah, I'm at it… hold your horses. 😎 |
Just fixing the obtrusive github thingies :D sorry! I'll hold back now |
One caveat I know of: when a property has been removed from a model,
|
Regarding the psalm failures left now - guess we need to update the docblocks in our
|
81b3d25
to
25fc924
Compare
Let's see what is left now…
Or we adjust that along with #2231 and relax it a bit… 🤷♂️ |
Yeah, we could do this. I mean at this point it's just a cosmetic change, which can happen any time. |
Can someone give me an update what needs to be done here? |
AFAIS only a psalm-update-baseline (and then actually fixing things with #2231) |
The tests should pass with a psalm baseline update (I'll do that now). Then we have two items from #1880 (comment) and finally #1880 (comment) - these are issues that could be addressed in a follow-up PR, if you agree… Oh, and of course we need to adjust the DB migrations in Neos and our other packages… |
Result of running php -d pcre.jit=0 ~/.composer/vendor/bin/psalm \ --config=Packages/Framework/psalm.xml --show-info=false \ --set-baseline=Packages/Framework/psalm-baseline.xml and throwing away a change related to the Redis ext (which I have installed, but Travis doesn't.)
811017e
to
46724aa
Compare
Well… that seems to be a mismatch betweeen Psalm versions. @albe Can you check this and maybe do the baseline update for now? |
|
I created a new issue for the known open tasks - so this could go in fast(er) for easier testing. 😬 |
Yeah, I have that on my radar, but I think we should then try to keep versions across our branches as close as possible (optimally in sync), because upmerging the baseline might otherwise become a hassle. |
Adjust DB migrations to Doctrine Migrations 3.0 See neos/flow-development-collection#1880 See neos/flow-development-collection#2122
This updated the required version of
doctrine/migrations
from 1.8 to 3.0.While there are new features in Doctrine Migrations, the reason for us to do
an upgrade is to move forward – the previously used version will not be
maintained forever… This post also gives some background on that:
https://www.doctrine-project.org/2020/04/10/doctrine-migrations-3.0.html
For a Flow user the commands remain unchanged, so far no multi-namespace
migrations are supported and the features to the "official" CLI do not matter,
since we embed the functionality in our own commands.
Breaking changes
There are three things that make this upgrade a breaking change:
Doctrine\DBAL\Migrations
moved toDoctrine\Migrations
AbstractMigration
changed method signatures (type delcarations added)To adjust your PHP code (the migration files), a core migration is provided that
should fix the vast majority of existing migrations. (That core migration is in Flow
and named
Version20201109224100
.)The needed changes to the DB table where the migration status is stored are done
the first time a command that accesses that table is used. Make sure to have a current
backup and then run
./flow doctrine:migrationstatus --show-migrations
. If allwent well, the migrations should all be listed as a fully-qualified class name, no
longer just a date/time string. If any errors occurred during the command, restore the
backup (the migrations table is sufficient), fix the errors and try again.
See https://github.com/doctrine/migrations/blob/3.0.x/UPGRADE.md#code-bc-breaks
and https://github.com/doctrine/migrations/blob/3.0.x/UPGRADE.md#upgrade-to-20
for a full list of other changes. Most of those are wrapped in Flow code and need no
adjustments in userland code.
Resolves #2122