Errors during write of phpunit.xml
are not handled correctly when --generate-configuration
is used
#5892
Labels
phpunit.xml
are not handled correctly when --generate-configuration
is used
#5892
Summary
After executed
--generate-configuration
shows Warning about Permission denied but shows message that Generatedphpunit.xml
in/var/www/html
although file was not generated in/var/www/html
.Current behavior
docker@numbers:/var/www/html$
./vendor/bin/phpunit --generate-configuration
PHPUnit 11.2.6 by Sebastian Bergmann and contributors.
Generating phpunit.xml in /var/www/html
Bootstrap script (relative to path shown above; default:
vendor/autoload.php
):vendor/testings.php
Tests directory (relative to path shown above; default:
tests
):testings
Source directory (relative to path shown above; default:
src
):.
Cache directory (relative to path shown above; default:
.phpunit.cache
):Warning:
file_put_contents(phpunit.xml)
: Failed to open stream: Permission denied in/var/www/html/vendor/phpunit/phpunit/src/TextUI/Command/Commands/GenerateConfigurationCommand.php on line 61
Generated
phpunit.xml
in/var/www/html.
Make sure to exclude the
.phpunit.cache
directory from version control.docker@numbers:/var/www/html$
ls -l phpunit.xml
ls: cannot access 'phpunit.xml': No such file or directory
docker@numbers:/var/www/html$
ls -ld
drwxrwxr-x
12 root root 4096 Jul 8 08:22 .How to reproduce
phpunit/phpunit/src/TextUI/Command/Commands/GenerateConfigurationCommand.php:61
Expected behavior
Unable to generate
phpunit.xml
in/var/www/html.
The text was updated successfully, but these errors were encountered: