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

To preserve behavior, configuration migration should set displayDetailsOnTestsThatTrigger* and failOn* when convert*ToExceptions was set #5406

Closed
anomiex opened this issue Jun 9, 2023 · 2 comments
Labels
type/enhancement A new idea that should be implemented

Comments

@anomiex
Copy link

anomiex commented Jun 9, 2023

In earlier versions of PHPUnit, convert*ToExceptions settings could be used to cause tests to fail if PHP deprecations, notices, warnings, or errors were raised.

People who had these options set (explicitly or by default) probably still want the corresponding behavior in PHPUnit 10 even after the separation of test issues and test outcomes. If they didn't want the behavior, they'd probably have turned them off.

Thus I think the least surprising behavior for migrated configurations would be to have phpunit continue to display the messages and to exit with a non-zero exit code by setting the corresponding displayDetailsOnTestsThatTrigger* and failOn* settings in the migrated configuration.

I suspect you'll disagree and close this, but I may as well ask since it doesn't seem anyone has actually asked about this before.

@anomiex anomiex added the type/enhancement A new idea that should be implemented label Jun 9, 2023
@anomiex
Copy link
Author

anomiex commented Jun 9, 2023

P.S. Even better would be to more closely preserve the past behavior by having failOnDeprecation and failOnWarning not apply to runner-triggered deprecations and warnings, but you already denied the latter in #5199 (comment) so I certainly don't expect that one to change.

@sebastianbergmann
Copy link
Owner

This is out of scope for XML configuration file migration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement A new idea that should be implemented
Projects
None yet
Development

No branches or pull requests

2 participants