Upgraded to Doctrine ORM 3 - #322
Conversation
|
great work @Shifrin |
|
@Shifrin Good job. Thank you. |
…ts can now pass by.
|
@peter-gribanov Thank you, I have removed the checks for the older PHP versions prior to 8.1. Please try again. |
|
@Shifrin unfortunately, not all tests were passed. You may need to increase the minimum version in Composer's requirements. |
|
@Shifrin i've expanded the settings. Tests should now run automatically. |
|
@peter-gribanov The minimum version was set already in the |
|
Good job. Thanks 👍 |
PR #322 replaced the ORM constraint instead of widening it, which turned an additive feature into a BC break and would have forced a major release. Doctrine ORM 3 support is additive instead, matching how Symfony 7 support shipped in v2.1.0. All three src changes from #322 are already BC: - Type::hasType() available since DBAL 2.9.0 - enableResultCache() available since ORM 2.8.0 - toIterable() available since ORM 2.8.0 The ORM floor is ^2.17 rather than ^2.5 because the specs now double Doctrine\ORM\Query, which was final up to and including ORM 2.16 and only became non-final in 2.17.0. symfony/polyfill-php80 has to come back: src/Filter/Like.php calls str_starts_with(), str_ends_with() and str_contains(), which only exist on PHP 7.x through that polyfill. Also fixes the three failing test jobs: - PHP 8.4 (highest and lowest) could not resolve at all, since PHP 8.4 support only landed in phpspec ^8.0. - PHP 8.1 + lowest died with "'\static' is an invalid class name", because --prefer-lowest resolved prophecy 1.14.0 while support for the static return type only arrived in 1.15.0, and ORM 3 uses static on its fluent setters. phpspec 7.x only requires prophecy ^1.9, so the constraint has to be explicit. Restoring the PHP 7.2-8.0 matrix rows is also required for the 2.x branch protection to stay satisfiable: "PHP 7.4 + highest + normal" and "PHP 8.0 + highest + normal" are required status checks, and #322 deleted the jobs that report them.
Also pre-existing and unrelated to ORM 3. The QA job installs whatever php-cs-fixer is current, and the @PhpCsFixer ruleset has grown rules since the last sweep: static_lambda, single_line_empty_body, no_extra_blank_lines, whitespace_after_comma_in_array, ordered_imports, phpdoc_separation and a few more. On a clean 2.x this reported 40 files; #322 had already brought that down to 31 by reformatting the tests it touched. No behaviour change. The specs still pass 527/527 and phpstan is still clean. Running the fixer a second time reports nothing, so the tree is now a fixed point of the current ruleset.
|
The upgrade was released in version v2.2.0. |
I added support for Doctrine ORM 3 by upgrading the dependencies and removed support for the older versions, so the update isn't backward compatible. And the minimum PHP version is set to ">= 8.1".