symfony / orm-pack

A Symfony Pack for Doctrine ORM
MIT License
1.82k stars 18 forks source link

Doctrine Migrations Bundle v3 #29

Closed BlackWiCKED closed 4 years ago

BlackWiCKED commented 4 years ago

I already configured my project to use doctrine/migrations v3.

When I ran composer update recently it downgraded the bundle to v2.2.1:

Downgrading doctrine/migrations (3.0.1 => 2.2.1): Loading from cache
Downgrading doctrine/doctrine-migrations-bundle (3.0.1 => 2.1.2)

It breaks my project's configuration and can't even manually set the package back to v3 because this package restricts it.

Please advise.

nicolas-grekas commented 4 years ago

You need to unpack the pack, then allow ^3 of you want to install migration v3.

BlackWiCKED commented 4 years ago

Thank you, that worked. For the record, I used the following command:

composer unpack orm

Based on this article.

nusphere commented 4 years ago

but an unpack will lose all future dependencies of the orm pack - its not a good solution

BlackWiCKED commented 4 years ago

I agree, it's a bit late now to stick to v2, as v3 is out for some time now and it resulted in automatic upgrade to doctrine-migrations v3. So anybody who already dealt with the compatibility issue now has trouble with the downgrade. The unpacking works, and I don't see any other solutions than that or: Downgrading symfony/orm-pack (v1.1.0 => v1.0.8)

Hopefully there will be a future orm-pack version that will use doctrine-migrations v3 (but it should be the user's choice whether to go with that or stick to orm-pack v1.1.0 and migrations-bundle v2).

nusphere commented 4 years ago

I have opened a pull request (#30) - in which I suggested that tagging be used.

in my opinion, the latest version of tag 1.1. * should be set to Doctrine Migration V2. But there should also be a new major tag (2.0.0), which does not stick this. Then it is up to the user himself which he takes.

A dependency on the complete pack remains and can also be used in the future. Otherwise, many would "unpack" the pack at the moment and it would be used less.

I currently have the pack restricted as follows:

"symfony / orm-pack": "1.0.8 || ^ 2.0"