-
-
Notifications
You must be signed in to change notification settings - Fork 848
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
Fix/cov #3702
Fix/cov #3702
Conversation
dunglas
commented
Sep 1, 2020
Q | A |
---|---|
Bug fix? | no |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tickets | fixes #... |
License | MIT |
Doc PR | n/a |
da79995
to
0cbfca5
Compare
2d3f778
to
b083283
Compare
.github/workflows/ci.yml
Outdated
@@ -120,7 +120,7 @@ jobs: | |||
composer update --no-progress --no-suggest --ansi | |||
- name: Install PHPUnit | |||
env: | |||
SYMFONY_PHPUNIT_VERSION: '9.2' | |||
SYMFONY_PHPUNIT_VERSION: '8.3' |
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.
It's better to run PHPStan with the latest versions of all deps.
use PHPUnit\SebastianBergmann\Comparator\ComparisonFailure; | ||
use SebastianBergmann\Comparator\ComparisonFailure as LegacyComparisonFailure; | ||
|
||
if (!class_exists(ComparisonFailure::class)) { | ||
class_alias(LegacyComparisonFailure::class, ComparisonFailure::class); | ||
class_alias(LegacyComparisonFailure::class, 'PHPUnit\SebastianBergmann\Comparator\ComparisonFailure'); |
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.
You can keep using ::class even if the class doesn't exist.
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.
phpstan does not agree
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.
When using ::class
, phpstan loads the class and fails because it doesn't find it.
* | ||
* @see https://github.com/sebastianbergmann/phpunit/issues/3494 | ||
*/ | ||
final class ArraySubsetV9 extends Constraint |
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.
Mark these classes as internal maybe?
69f4d90
to
8c32dce
Compare
Thanks @soyuka! |
* fix prophecy trait (#3700) * fix prophecy trait * Support multiple phpunit version ArraySubset (#3702) * fix: restore coverage * Fix phpstan * Remove php-code-coverage dependency * Support multiple phpunit version ArraySubset Co-authored-by: soyuka <soyuka@users.noreply.github.com> Co-authored-by: Grégoire Hébert <gregoire@les-tilleuls.coop> Co-authored-by: Kévin Dunglas <dunglas@gmail.com>