[PR #6821] Make test suite compatible with PHP 7.2 #10158

Closed
opened 2026-01-22 16:06:37 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/6821

State: closed
Merged: Yes


With PHP 7.2:

There was 1 error:
1) Doctrine\Tests\ORM\Functional\QueryCacheTest::testQueryCache_HitDoesNotSaveParserResult
count(): Parameter must be an array or an object that implements Countable
/builddir/build/BUILDROOT/php-doctrine-orm-2.5.11-1.fc28.noarch/usr/share/php/Doctrine/ORM/Query.php:306
/builddir/build/BUILDROOT/php-doctrine-orm-2.5.11-1.fc28.noarch/usr/share/php/Doctrine/ORM/AbstractQuery.php:969
/builddir/build/BUILDROOT/php-doctrine-orm-2.5.11-1.fc28.noarch/usr/share/php/Doctrine/ORM/AbstractQuery.php:924
/builddir/build/BUILDROOT/php-doctrine-orm-2.5.11-1.fc28.noarch/usr/share/php/Doctrine/ORM/AbstractQuery.php:727
/builddir/build/BUILD/doctrine2-249b737094f1e7cba4f0a8d19acf5be6cf3ed504/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php:148

And, since 7.1

There were 4 errors:

1) Doctrine\Tests\ORM\Cache\Persister\Entity\NonStrictReadWriteCachedEntityPersisterTest::testTransactionRollBackShouldClearQueue
ReflectionException: Given object is not an instance of the class this property was declared in

/work/GIT/doctrine2/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php:40

2) Doctrine\Tests\ORM\Cache\Persister\Entity\NonStrictReadWriteCachedEntityPersisterTest::testInsertTransactionCommitShouldPutCache
ReflectionException: Given object is not an instance of the class this property was declared in

/work/GIT/doctrine2/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php:77

3) Doctrine\Tests\ORM\Cache\Persister\Entity\NonStrictReadWriteCachedEntityPersisterTest::testUpdateTransactionCommitShouldPutCache
ReflectionException: Given object is not an instance of the class this property was declared in

/work/GIT/doctrine2/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php:106

4) Doctrine\Tests\ORM\Cache\Persister\Entity\NonStrictReadWriteCachedEntityPersisterTest::testDeleteTransactionCommitShouldEvictCache
ReflectionException: Given object is not an instance of the class this property was declared in

/work/GIT/doctrine2/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php:134

**Original Pull Request:** https://github.com/doctrine/orm/pull/6821 **State:** closed **Merged:** Yes --- With PHP 7.2: ``` There was 1 error: 1) Doctrine\Tests\ORM\Functional\QueryCacheTest::testQueryCache_HitDoesNotSaveParserResult count(): Parameter must be an array or an object that implements Countable /builddir/build/BUILDROOT/php-doctrine-orm-2.5.11-1.fc28.noarch/usr/share/php/Doctrine/ORM/Query.php:306 /builddir/build/BUILDROOT/php-doctrine-orm-2.5.11-1.fc28.noarch/usr/share/php/Doctrine/ORM/AbstractQuery.php:969 /builddir/build/BUILDROOT/php-doctrine-orm-2.5.11-1.fc28.noarch/usr/share/php/Doctrine/ORM/AbstractQuery.php:924 /builddir/build/BUILDROOT/php-doctrine-orm-2.5.11-1.fc28.noarch/usr/share/php/Doctrine/ORM/AbstractQuery.php:727 /builddir/build/BUILD/doctrine2-249b737094f1e7cba4f0a8d19acf5be6cf3ed504/tests/Doctrine/Tests/ORM/Functional/QueryCacheTest.php:148 ``` And, since 7.1 ``` There were 4 errors: 1) Doctrine\Tests\ORM\Cache\Persister\Entity\NonStrictReadWriteCachedEntityPersisterTest::testTransactionRollBackShouldClearQueue ReflectionException: Given object is not an instance of the class this property was declared in /work/GIT/doctrine2/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php:40 2) Doctrine\Tests\ORM\Cache\Persister\Entity\NonStrictReadWriteCachedEntityPersisterTest::testInsertTransactionCommitShouldPutCache ReflectionException: Given object is not an instance of the class this property was declared in /work/GIT/doctrine2/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php:77 3) Doctrine\Tests\ORM\Cache\Persister\Entity\NonStrictReadWriteCachedEntityPersisterTest::testUpdateTransactionCommitShouldPutCache ReflectionException: Given object is not an instance of the class this property was declared in /work/GIT/doctrine2/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php:106 4) Doctrine\Tests\ORM\Cache\Persister\Entity\NonStrictReadWriteCachedEntityPersisterTest::testDeleteTransactionCommitShouldEvictCache ReflectionException: Given object is not an instance of the class this property was declared in /work/GIT/doctrine2/tests/Doctrine/Tests/ORM/Cache/Persister/Entity/NonStrictReadWriteCachedEntityPersisterTest.php:134 ```
admin added the pull-request label 2026-01-22 16:06:37 +01:00
admin closed this issue 2026-01-22 16:06:38 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#10158