-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Make sure tests are run with full error reporting #875
Conversation
This is also done in all symfony components. It makes sure that tests report all errors and warnings including strict ones. Often this is not the case otherwise. The other advantage is that it makes tests more equal in PHP 5 and PHP 7. PHP 7 removed strict errors and changed them to warnings or notices. So in PHP 7 those errors might cause failures but they do not cause failures in PHP 5 when strict is ignored.
@nicolas-grekas what do you think? |
👍 |
I wonder how this interacts with https://github.com/symfony/symfony-standard/blob/2.8/app/autoload.php#L6 that is part of the bootstrapping? |
@Tobion I think this line should be specific to entry points ( |
@nicolas-grekas do you agree with this PR? And shouldn't we add symfony/phpunit-bridge to the require-dev section as well? |
LGTM Yes. Adjoint the bridge is a good idea although not strictly required since it looks like that no deprecations are triggered for now |
I just tested it with phpunit and the php config is executed before AND after the So this is good to be merged. |
For the phpunit-bridge I created #884 |
Thank you @Tobion. |
This PR was merged into the 2.3 branch. Discussion ---------- Make sure tests are run with full error reporting This is also done in all symfony components. It makes sure that tests report all errors and warnings including strict ones. Often this is not the case otherwise (because it's not part of the php defaults). The other advantage is that it makes tests more equal in PHP 5 and PHP 7. PHP 7 removed strict errors and changed them to warnings or notices. So in PHP 7 those errors might cause failures but they do not cause failures in PHP 5 when strict is ignored. Commits ------- e159c84 Make sure tests are run with full error reporting
This is also done in all symfony components. It makes sure that tests report all errors and warnings including strict ones.
Often this is not the case otherwise (because it's not part of the php defaults). The other advantage is that it makes tests more equal in PHP 5 and PHP 7. PHP 7 removed strict errors and changed them to warnings or notices. So in PHP 7 those errors might cause failures but they do not cause failures in PHP 5 when strict is ignored.