You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run it with process isolation: ./phpunit-8.0.0.phar --process-isolation test.php
Observe the failure:
PHPUnit 8.0.0 by Sebastian Bergmann and contributors.
E 1 / 1 (100%)
Time: 124 ms, Memory: 10.00MB
There was 1 error:
1) Test::testTrue
PHPUnit\Framework\Exception: PHP Fatal error: strict_types declaration must be the very first statement in the script in /path/phpunit-8.0.0.phar on line 2
PHP Stack trace:
PHP 1. {main}() Standard input code:0
Fatal error: strict_types declaration must be the very first statement in the script in /path/phpunit-8.0.0.phar on line 2
Call Stack:
0.0008 511120 1. {main}() Standard input code:0
ERRORS!
Tests: 1, Assertions: 0, Errors: 1.
The text was updated successfully, but these errors were encountered:
sebastianbergmann
changed the title
Process isolation not working in 8.0.0
Process Isolation does not work with phpunit.phar
Feb 3, 2019
It seems that there is a bug in PHP that when a PHAR is include()d or require()d and the PHAR's bootstrap script has a shebang such as #!/usr/bin/env php on its first line followed by <?php declare(strict_types=1); on its second line then PHP wrongly triggers a
strict_types declaration must be the very first statement in the script
Steps to reproduce:
Install PHPUnit 8.0.0 via phar:
wget https://phar.phpunit.de/phpunit-8.0.0.phar && chmod a+x phpunit-8.0.0.phar
With any test file:
./phpunit-8.0.0.phar --process-isolation test.php
Observe the failure:
The text was updated successfully, but these errors were encountered: