Skip to content

Improve output of --check-php-configuration #6307

@MacDada

Description

@MacDada

Current output:

./vendor/bin/phpunit --check-php-configuration        
PHPUnit 12.3.2 by Sebastian Bergmann and contributors.

Checking whether PHP is configured according to https://docs.phpunit.de/en/12.3/installation.html#configuring-php-for-development

display_errors = On         ... ok
display_startup_errors = On ... ok
error_reporting = -1        ... not ok
zend.assertions = 1         ... ok
assert.exception = 1        ... ok
memory_limit = -1           ... not ok

This is my result. I now know that I should probably change my error_reporting and memory_limit for the CLI, BUT it wasn't my initial thought: at first I was thinking that there was a bug in PHPUnit… since it's showing my that "my memory limit is -1 and it's not ok" xD

Well, actually it's showing the desired value and ok/not ok – not the current value ;-)

Suggested improvement: if the value is not ok -> then show the current value next to the desired value -> it will be more obvious what's going on and and easier to fix.

Expected output:

./vendor/bin/phpunit --check-php-configuration        
PHPUnit 12.3.2 by Sebastian Bergmann and contributors.

Checking whether PHP is configured according to https://docs.phpunit.de/en/12.3/installation.html#configuring-php-for-development

display_errors = On         ... ok
display_startup_errors = On ... ok
error_reporting = -1        ... not ok (30719)
zend.assertions = 1         ... ok
assert.exception = 1        ... ok
memory_limit = -1           ... not ok (128M)

Metadata

Metadata

Labels

type/enhancementA new idea that should be implementedversion/10Something affects PHPUnit 10version/11Something affects PHPUnit 11version/12Something affects PHPUnit 12

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions