-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
run tests with PHPUnit 12.1 on PHP >= 8.3 #61333
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
Conversation
xabbuh
commented
Aug 4, 2025
Q | A |
---|---|
Branch? | 7.4 |
Bug fix? | no |
New feature? | no |
Deprecations? | no |
Issues | |
License | MIT |
Status: Needs work |
|
||
$this->assertSamePath(\PHP_BINARY, $result); | ||
} finally { | ||
ini_set('open_basedir', $initialOpenBaseDir); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This never used to work as expected as you cannot widen the open basedir restrictions after tightening it before. Later on when PHPUnit cleaned up the test environment this led to a PHP warning which in turn lets the test fail:
src/Symfony/Component/Process 19s
+ /home/runner/work/symfony/symfony/phpunit --exclude-group tty --exclude-group benchmark --exclude-group intl-data --exclude-group integration --exclude-group transient src/Symfony/Component/Process
PHPUnit 12.1.6 by Sebastian Bergmann and contributors.
Runtime: PHP 8.3.23
Configuration: /home/runner/work/symfony/symfony/phpunit.xml.dist
........WS.S................................................... 63 / 186 ( 33%)
...................SSS......................................... 126 / 186 ( 67%)
...........................................................S 186 / 186 (100%)
Time: 00:19.259, Memory: 16.00 MB
1 test triggered 1 PHP warning:
1) /home/runner/work/symfony/symfony/.phpunit/phpunit-12.1-0/src/Framework/TestCase.php:1290
ini_set(): open_basedir restriction in effect. File() is not within the allowed path(s): (/usr/bin:/)
Triggered by:
* Symfony\Component\Process\Tests\ExecutableFinderTest::testFindWithOpenBaseDir
/home/runner/work/symfony/symfony/src/Symfony/Component/Process/Tests/ExecutableFinderTest.php:115
Status: Needs Review |
Why not 12.3? |
That's the ultimate goal, but we have to fix issues with every minor update we do for PHPUnit. That's why I am doing it step by step. |
Thank you @xabbuh. |