Skip to content
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

If the error_reporting directive's value is "" then it could lead to escaping mutants #1660

Open
sanmai opened this issue Feb 2, 2022 · 2 comments

Comments

@sanmai
Copy link
Member

sanmai commented Feb 2, 2022

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 env missing php.ini, but this makes me think if this can somehow be prevented by Infection itself? For example by adding a ini setting in Infections generated phpunit.xml that would set error_reporting to E_ALL. @maks-rafalko What do you think?

Originally posted by @martinssipenko in #1659 (comment)

@sanmai sanmai changed the title nvironment does not have a default php.ini file and thus the error_reporting directives value is "": If the error_reporting directives value is "" then it could lead to escaping mutants Feb 2, 2022
@sanmai sanmai changed the title If the error_reporting directives value is "" then it could lead to escaping mutants If the error_reporting directive's value is "" then it could lead to escaping mutants Feb 2, 2022
@martinssipenko
Copy link
Contributor

If adding this makes sense I'd be happy to create a Pull request that would implement it.

@sanmai
Copy link
Member Author

sanmai commented Feb 2, 2022

That's a great idea! I don't remember it being particularly difficult. You can take this PR for an example: #1630

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants