DDC-3191: [GH-1072] Fix attempt of traversing bool in FileLockRegion #3954

Open
opened 2026-01-22 14:32:16 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Jun 26, 2014).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of kamazee:

Url: https://github.com/doctrine/doctrine2/pull/1072

Message:

Minor fix: on some platforms (i.e. ArchLinux) glob() returns false when nothing matched even though no errors occurred. As docs for glob say, such behavior is expected (see ‘Note’ at http://php.net/glob)

This made 1 existing test fail:

./vendor/bin/phpunit 
PHPUnit 4.3-g58f3a0e by Sebastian Bergmann.

Configuration read from /home/alex/git/doctrine2/phpunit.xml.dist

.............................................................   61 / 2495 (  2%)
........S.............E......................................  122 / 2495 (  4%)
.............................................................  183 / 2495 (  7%)
.............................................................  244 / 2495 (  9%)
.............................................................  305 / 2495 ( 12%)
.............................................................  366 / 2495 ( 14%)
.........................S...SSSS.S..........................  427 / 2495 ( 17%)
.............................................................  488 / 2495 ( 19%)
....................................................SS.......  549 / 2495 ( 22%)
.............................................................  610 / 2495 ( 24%)
.............................................................  671 / 2495 ( 26%)
.............................................................  732 / 2495 ( 29%)
.............................................................  793 / 2495 ( 31%)
.......................................................S.SSSS  854 / 2495 ( 34%)
SSSSSSSS.....................................................  915 / 2495 ( 36%)
.........................................SS..................  976 / 2495 ( 39%)
............S...S...........S..............................S. 1037 / 2495 ( 41%)
............................................................. 1098 / 2495 ( 44%)
..................S.......................................... 1159 / 2495 ( 46%)
.................................................SS.......... 1220 / 2495 ( 48%)
.......................S..................................... 1281 / 2495 ( 51%)
............................................................. 1342 / 2495 ( 53%)
............................................................. 1403 / 2495 ( 56%)
............................................................. 1464 / 2495 ( 58%)
............................................................. 1525 / 2495 ( 61%)
............................................................. 1586 / 2495 ( 63%)
.........S.................................................S. 1647 / 2495 ( 66%)
............................................................. 1708 / 2495 ( 68%)
............................................................. 1769 / 2495 ( 70%)
............................................................. 1830 / 2495 ( 73%)
............................................................. 1891 / 2495 ( 75%)
............................................................. 1952 / 2495 ( 78%)
............................................................. 2013 / 2495 ( 80%)
............................................................. 2074 / 2495 ( 83%)
............................................................. 2135 / 2495 ( 85%)
............................................................. 2196 / 2495 ( 88%)
............................................................. 2257 / 2495 ( 90%)
............................................................. 2318 / 2495 ( 92%)
............................................................S 2379 / 2495 ( 95%)
.......S......S.......S.....................S...........S.... 2440 / 2495 ( 97%)
.......................................................

Time: 14.37 seconds, Memory: 164.50Mb

There was 1 error:

1) Doctrine\Tests\ORM\Cache\FileLockRegionTest::testEvictAll
Invalid argument supplied for foreach()

/home/alex/git/doctrine2/lib/Doctrine/ORM/Cache/Region/FileLockRegion.php:204
/home/alex/git/doctrine2/tests/Doctrine/Tests/ORM/Cache/AbstractRegionTest.php:80

Traversing bool is no good and casting to array wouldn't hurt there as far as I can tell.

Originally created by @doctrinebot on GitHub (Jun 26, 2014). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user @doctrinebot: This issue is created automatically through a Github pull request on behalf of kamazee: Url: https://github.com/doctrine/doctrine2/pull/1072 Message: Minor fix: on some platforms (i.e. ArchLinux) `glob()` returns `false` when nothing matched even though no errors occurred. As docs for `glob` say, such behavior is expected (see ‘Note’ at http://php.net/glob) This made 1 existing test fail: ``` ./vendor/bin/phpunit PHPUnit 4.3-g58f3a0e by Sebastian Bergmann. Configuration read from /home/alex/git/doctrine2/phpunit.xml.dist ............................................................. 61 / 2495 ( 2%) ........S.............E...................................... 122 / 2495 ( 4%) ............................................................. 183 / 2495 ( 7%) ............................................................. 244 / 2495 ( 9%) ............................................................. 305 / 2495 ( 12%) ............................................................. 366 / 2495 ( 14%) .........................S...SSSS.S.......................... 427 / 2495 ( 17%) ............................................................. 488 / 2495 ( 19%) ....................................................SS....... 549 / 2495 ( 22%) ............................................................. 610 / 2495 ( 24%) ............................................................. 671 / 2495 ( 26%) ............................................................. 732 / 2495 ( 29%) ............................................................. 793 / 2495 ( 31%) .......................................................S.SSSS 854 / 2495 ( 34%) SSSSSSSS..................................................... 915 / 2495 ( 36%) .........................................SS.................. 976 / 2495 ( 39%) ............S...S...........S..............................S. 1037 / 2495 ( 41%) ............................................................. 1098 / 2495 ( 44%) ..................S.......................................... 1159 / 2495 ( 46%) .................................................SS.......... 1220 / 2495 ( 48%) .......................S..................................... 1281 / 2495 ( 51%) ............................................................. 1342 / 2495 ( 53%) ............................................................. 1403 / 2495 ( 56%) ............................................................. 1464 / 2495 ( 58%) ............................................................. 1525 / 2495 ( 61%) ............................................................. 1586 / 2495 ( 63%) .........S.................................................S. 1647 / 2495 ( 66%) ............................................................. 1708 / 2495 ( 68%) ............................................................. 1769 / 2495 ( 70%) ............................................................. 1830 / 2495 ( 73%) ............................................................. 1891 / 2495 ( 75%) ............................................................. 1952 / 2495 ( 78%) ............................................................. 2013 / 2495 ( 80%) ............................................................. 2074 / 2495 ( 83%) ............................................................. 2135 / 2495 ( 85%) ............................................................. 2196 / 2495 ( 88%) ............................................................. 2257 / 2495 ( 90%) ............................................................. 2318 / 2495 ( 92%) ............................................................S 2379 / 2495 ( 95%) .......S......S.......S.....................S...........S.... 2440 / 2495 ( 97%) ....................................................... Time: 14.37 seconds, Memory: 164.50Mb There was 1 error: 1) Doctrine\Tests\ORM\Cache\FileLockRegionTest::testEvictAll Invalid argument supplied for foreach() /home/alex/git/doctrine2/lib/Doctrine/ORM/Cache/Region/FileLockRegion.php:204 /home/alex/git/doctrine2/tests/Doctrine/Tests/ORM/Cache/AbstractRegionTest.php:80 ``` Traversing bool is no good and casting to array wouldn't hurt there as far as I can tell.
admin added the Bug label 2026-01-22 14:32:16 +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#3954