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
DX: remove symfony/phpunit-bridge
#7578
DX: remove symfony/phpunit-bridge
#7578
Conversation
|
||
protected function tearDown(): void | ||
{ | ||
if (null !== $this->previouslyDefinedErrorHandler) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is anything around sebastianbergmann/phpunit#5532 helping us to avoid local implementation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't able to figure anything out that would still work with PHP 7.4 and PHPUnit 9.
foreach ($this->expectedDeprecations as $expectedDeprecation) { | ||
self::assertContains($expectedDeprecation, $this->actualDeprecations); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if count(actual) > count(expected)
?
we could miss some exceptions. I suggest to check them too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do that in separate PR, it will look quite funny, I promise.
|
||
/** | ||
* @TODO change access to protected and pass the parameter when PHPUnit 9 support is dropped | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*/ | |
* @param string $message | |
*/ |
possible ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ondrej says "no":
------ ----------------------------------------------------------
Line tests/TestCase.php
------ ----------------------------------------------------------
60 PHPDoc tag @param references unknown parameter: $message
------ ----------------------------------------------------------
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, was afraid some sca will fail on "future param"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall OK, left few minor comments
Co-authored-by: Dariusz Rumiński <dariusz.ruminski@gmail.com>
Both listeners and
expectDeprecation
got removed in PHPUnit 10, so to keep checking for deprecations we need to have our implementation.We can move to the event system that got introduced in PHPUnit 10 when we use PHPUnit 10+ (requires supporting PHP 8.1+ only).