Skip to content

Escaped mutants in CI #1659

Closed Answered by martinssipenko
martinssipenko asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the tips! I've found out that my CI environment does not have a default php.ini file and thus the error_reporting directives value is "":

php > var_dump(ini_get('error_reporting'));
string(0) ""

This is despite PHP documentation suggesting there is a default value that depends on the PHP version you are using (either E_ALL or E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED prior to PHP 8.0.0).

Not having this defined lead to Notices not being converted into errors on my CI which lead to escaping mutants. When I tried running Infection by setting error_reporting to E_ALL (32767): php -d error_reporting=32767 ./vendor/bin/infection it works as expected.

I will now go and fix my CI …

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
3 replies
@martinssipenko
Comment options

@martinssipenko
Comment options

@maks-rafalko
Comment options

Comment options

You must be logged in to vote
1 reply
@sanmai
Comment options

Answer selected by martinssipenko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants