Skip to content

Refactor PHPUnitVersionDetector to ease different major version checks #466

Refactor PHPUnitVersionDetector to ease different major version checks

Refactor PHPUnitVersionDetector to ease different major version checks #466

Triggered via pull request October 28, 2025 19:18
@staabmstaabm
synchronize #248
staabm:refac
Status Failure
Total duration 1m 55s
Artifacts

build.yml

on: pull_request
Matrix: PHPStan
Matrix: Tests
Coding Standard
20s
Coding Standard
Matrix: Lint
Matrix: Mutation Testing
Fit to window
Zoom out
Zoom in

Annotations

3 errors and 9 warnings
Mutation Testing (8.4, ubuntu-latest)
Process completed with exit code 1.
Mutation Testing (8.2, ubuntu-latest)
Process completed with exit code 1.
Mutation Testing (8.3, ubuntu-latest)
Process completed with exit code 1.
Mutation Testing (8.4, ubuntu-latest): src/Rules/PHPUnit/DataProviderHelper.php#L161
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ if (!$dataProviderMethodReflection->isPublic()) { $errors[] = RuleErrorBuilder::message(sprintf('@dataProvider %s related method must be public.', $dataProviderValue))->line($lineNumber)->identifier('phpunit.dataProviderPublic')->build(); } - if ($deprecationRulesInstalled && $this->PHPUnitVersion->requiresStaticDataProviders()->yes() && !$dataProviderMethodReflection->isStatic()) { + if ($deprecationRulesInstalled && !$this->PHPUnitVersion->requiresStaticDataProviders()->no() && !$dataProviderMethodReflection->isStatic()) { $errorBuilder = RuleErrorBuilder::message(sprintf('@dataProvider %s related method must be static in PHPUnit 10 and newer.', $dataProviderValue))->line($lineNumber)->identifier('phpunit.dataProviderStatic'); $dataProviderMethodReflectionDeclaringClass = $dataProviderMethodReflection->getDeclaringClass(); if ($dataProviderMethodReflectionDeclaringClass->getFileName() !== null) {
Mutation Testing (8.4, ubuntu-latest): src/Rules/PHPUnit/DataProviderHelper.php#L68
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ public function getDataProviderMethods(Scope $scope, $testMethod, ClassReflection $classReflection): iterable { yield from $this->yieldDataProviderAnnotations($testMethod, $scope, $classReflection); - if (!$this->PHPUnitVersion->supportsDataProviderAttribute()->yes()) { + if ($this->PHPUnitVersion->supportsDataProviderAttribute()->no()) { return; } yield from $this->yieldDataProviderAttributes($testMethod, $classReflection);
Mutation Testing (8.4, ubuntu-latest)
Unexpected input(s) 'extensions', valid inputs are ['php-version', 'php-extensions']
Mutation Testing (8.2, ubuntu-latest): src/Rules/PHPUnit/DataProviderHelper.php#L161
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ if (!$dataProviderMethodReflection->isPublic()) { $errors[] = RuleErrorBuilder::message(sprintf('@dataProvider %s related method must be public.', $dataProviderValue))->line($lineNumber)->identifier('phpunit.dataProviderPublic')->build(); } - if ($deprecationRulesInstalled && $this->PHPUnitVersion->requiresStaticDataProviders()->yes() && !$dataProviderMethodReflection->isStatic()) { + if ($deprecationRulesInstalled && !$this->PHPUnitVersion->requiresStaticDataProviders()->no() && !$dataProviderMethodReflection->isStatic()) { $errorBuilder = RuleErrorBuilder::message(sprintf('@dataProvider %s related method must be static in PHPUnit 10 and newer.', $dataProviderValue))->line($lineNumber)->identifier('phpunit.dataProviderStatic'); $dataProviderMethodReflectionDeclaringClass = $dataProviderMethodReflection->getDeclaringClass(); if ($dataProviderMethodReflectionDeclaringClass->getFileName() !== null) {
Mutation Testing (8.2, ubuntu-latest): src/Rules/PHPUnit/DataProviderHelper.php#L68
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ public function getDataProviderMethods(Scope $scope, $testMethod, ClassReflection $classReflection): iterable { yield from $this->yieldDataProviderAnnotations($testMethod, $scope, $classReflection); - if (!$this->PHPUnitVersion->supportsDataProviderAttribute()->yes()) { + if ($this->PHPUnitVersion->supportsDataProviderAttribute()->no()) { return; } yield from $this->yieldDataProviderAttributes($testMethod, $classReflection);
Mutation Testing (8.2, ubuntu-latest)
Unexpected input(s) 'extensions', valid inputs are ['php-version', 'php-extensions']
Mutation Testing (8.3, ubuntu-latest): src/Rules/PHPUnit/DataProviderHelper.php#L161
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ if (!$dataProviderMethodReflection->isPublic()) { $errors[] = RuleErrorBuilder::message(sprintf('@dataProvider %s related method must be public.', $dataProviderValue))->line($lineNumber)->identifier('phpunit.dataProviderPublic')->build(); } - if ($deprecationRulesInstalled && $this->PHPUnitVersion->requiresStaticDataProviders()->yes() && !$dataProviderMethodReflection->isStatic()) { + if ($deprecationRulesInstalled && !$this->PHPUnitVersion->requiresStaticDataProviders()->no() && !$dataProviderMethodReflection->isStatic()) { $errorBuilder = RuleErrorBuilder::message(sprintf('@dataProvider %s related method must be static in PHPUnit 10 and newer.', $dataProviderValue))->line($lineNumber)->identifier('phpunit.dataProviderStatic'); $dataProviderMethodReflectionDeclaringClass = $dataProviderMethodReflection->getDeclaringClass(); if ($dataProviderMethodReflectionDeclaringClass->getFileName() !== null) {
Mutation Testing (8.3, ubuntu-latest): src/Rules/PHPUnit/DataProviderHelper.php#L68
Escaped Mutant for Mutator "PHPStan\Infection\TrinaryLogicMutator": @@ @@ public function getDataProviderMethods(Scope $scope, $testMethod, ClassReflection $classReflection): iterable { yield from $this->yieldDataProviderAnnotations($testMethod, $scope, $classReflection); - if (!$this->PHPUnitVersion->supportsDataProviderAttribute()->yes()) { + if ($this->PHPUnitVersion->supportsDataProviderAttribute()->no()) { return; } yield from $this->yieldDataProviderAttributes($testMethod, $classReflection);
Mutation Testing (8.3, ubuntu-latest)
Unexpected input(s) 'extensions', valid inputs are ['php-version', 'php-extensions']