-
Notifications
You must be signed in to change notification settings - Fork 20
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
Document how to integrate with PHPUnit #66
Conversation
Stolen from @wouterj at phpDocumentor/guides#1184 |
This is not 100% true, you must use PHPUnit's |
Why do you have to do that, and how do you do that? I tried using just |
Using Without |
@wouterj that's not what I observe. Without
|
$type = self::$type ?? self::getTypeFromEnv(); |
So I think you're right about the necessity to add #[WithoutErrorHandler]
, but that's not all, you also have to somehow make sure the env is read into Deprecations::$type
before using VerifyDeprecations
, otherwise you will mask all subsequent calls to trigger.
dfaf597
to
5eff5be
Compare
Right now, it is possible to display Doctrine deprecations with a bit of PHPUnit configuration. Note that this does not seem to clash with triggering self-deprecations, provided you use the VerifyDeprecations trait in tests that call the deprecated pieces of code.
5eff5be
to
a8a2989
Compare
I pushed a code change that I believe addresses the issue |
Right now, it is possible to display Doctrine deprecations with a bit of PHPUnit configuration.
Note that this does not seem to clash with triggering self-deprecations, provided you use the
VerifyDeprecations
trait in tests that call the deprecated pieces of code.