symfony / orm-pack

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

Bump doctrine/orm: ^2.5.11 -> ^2.6.3 #12

Closed Adrien-H closed 4 years ago

Adrien-H commented 5 years ago

Current version of Doctrine in symfony/orm-pack is meeting compatibility issues with PHP 7.3.

See https://github.com/doctrine/doctrine2/issues/7402 from Doctrine repository.

So we need doctrine/orm:2.6.3. Otherwise, Doctrine will keep raising this:

$ php7.3 bin/console doctrine:fixtures:load

In UnitOfWork.php line 2718:
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

This would also resolve https://github.com/symfony/orm-pack/issues/11.

artemisclyde commented 5 years ago

Do you guys have an ETA for this? I'm probably a more rare case, but as I am using Doctrine on Arch Linux which has some packages already relying on php 7.3, this causes me a lot of trouble.

fabpot commented 5 years ago

^2.5.1 includes all versions after 2.5.1, including 2.6 ones, so I don't understand why it helps.

martijnhartlief commented 5 years ago

When you do composer update symfony/* --with-all-dependencies it does not actually update Doctrine.

To force doctrine to upgrade you will have to run composer update symfony/orm-pack --with-all-dependencies.

You would expect it to be recursive, but I guess it isn't.

Adrien-H commented 5 years ago

Well technically you should be right, @fabpot. But for one reason or another, and I did not take time to find which one, Doctrine comes in 2.5 on composer require symfony/orm-pack.

That's no big deal, it is easy indeed to enforce the update after installation. But we would expect it to work out of the box on most recent PHP versions, and it does make sense anyway to specify ^2.6.3 since this version brings a critical bugfix.

I just think merging this PR costs nothing, that's your call boss. (:

uvimoran commented 5 years ago

Under symfony 2.8, it seems likely that the reason why 2.5 is installed instead of 2.6.3 is because doctrine/orm dropped support for "symfony/console" : "~2.5":

doctrine/orm v2.5.41: "symfony/console": "~2.5|~3.0|~4.0" doctrine/orm v2.6.3: "symfony/console": "~3.0|~4.0"

This is currently preventing symfony 2.8 projects from completing a composer update command under a php 7.3 cli.