Skip to content
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

Make test suite compatible with PHP 7.2 #6821

Merged
merged 3 commits into from Nov 12, 2017
Merged

Conversation

remicollet
Copy link

@remicollet remicollet commented Nov 10, 2017

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

@remicollet remicollet changed the title fix for 7.2, don't mock getResultSetMapping to properly get an empty … For PHP 7.2 Nov 10, 2017
@remicollet
Copy link
Author

3rd commit: apc_cache_info without paramter returns NULL with recent version.

@remicollet
Copy link
Author

Using PHP 7.2.0RC6

$ php -d apc.enable_cli=1 -d memory_limit=1G vendor/bin/phpunit 
PHPUnit 4.8.36-1-g18e5f52 by Sebastian Bergmann and contributors.

.............................................................   61 / 3025 (  2%)
.............................................................  122 / 3025 (  4%)
.............................................................  183 / 3025 (  6%)
.............................................................  244 / 3025 (  8%)
.............................................................  305 / 3025 ( 10%)
.............................................................  366 / 3025 ( 12%)
......................................S.......SSSS.S.........  427 / 3025 ( 14%)
.............................................................  488 / 3025 ( 16%)
.............................................................  549 / 3025 ( 18%)
................................SS...........................  610 / 3025 ( 20%)
.............................................................  671 / 3025 ( 22%)
.............................................................  732 / 3025 ( 24%)
.............................................................  793 / 3025 ( 26%)
.............................................................  854 / 3025 ( 28%)
.............................................................  915 / 3025 ( 30%)
.............................................................  976 / 3025 ( 32%)
..........................S.SSSSSSSSSSSS..................... 1037 / 3025 ( 34%)
............................................................. 1098 / 3025 ( 36%)
.........................................SS.................. 1159 / 3025 ( 38%)
............S...S...........S..............................S. 1220 / 3025 ( 40%)
............................................................. 1281 / 3025 ( 42%)
..................S.......................................... 1342 / 3025 ( 44%)
............................................................. 1403 / 3025 ( 46%)
............................................................S 1464 / 3025 ( 48%)
S.....................................S...................... 1525 / 3025 ( 50%)
............................................................. 1586 / 3025 ( 52%)
............................................................. 1647 / 3025 ( 54%)
............................................................. 1708 / 3025 ( 56%)
............................................................. 1769 / 3025 ( 58%)
............................................................. 1830 / 3025 ( 60%)
............................................................. 1891 / 3025 ( 62%)
............................................................. 1952 / 3025 ( 64%)
....................S........................................ 2013 / 3025 ( 66%)
......II........................S............................ 2074 / 3025 ( 68%)
............................................................. 2135 / 3025 ( 70%)
............................................................. 2196 / 3025 ( 72%)
............................................................. 2257 / 3025 ( 74%)
............................................................. 2318 / 3025 ( 76%)
............................................................. 2379 / 3025 ( 78%)
............................................................. 2440 / 3025 ( 80%)
............................................................. 2501 / 3025 ( 82%)
............................................................. 2562 / 3025 ( 84%)
............................................................. 2623 / 3025 ( 86%)
............................................................. 2684 / 3025 ( 88%)
............................................................. 2745 / 3025 ( 90%)
............................................................. 2806 / 3025 ( 92%)
...................................................S.......S. 2867 / 3025 ( 94%)
.....S.......S.......................S............S.......... 2928 / 3025 ( 96%)
............................................................. 2989 / 3025 ( 98%)
....................................

Time: 4.59 seconds, Memory: 144.00MB

OK, but incomplete, skipped, or risky tests!
Tests: 3025, Assertions: 11321, Skipped: 39, Incomplete: 2.

@lcobucci lcobucci changed the title For PHP 7.2 Make test suite compatible with PHP 7.2 Nov 12, 2017
@lcobucci lcobucci added this to the 2.5.12 milestone Nov 12, 2017
@lcobucci lcobucci merged commit 049470c into doctrine:2.5 Nov 12, 2017
@lcobucci lcobucci self-assigned this Nov 12, 2017
@lcobucci
Copy link
Member

Thanks @remicollet

@lcobucci lcobucci modified the milestones: 2.5.12, 2.5.13 Nov 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants