Setup mutation testing #309
Annotations
8 errors and 10 warnings
Platform test (8.0)
Process completed with exit code 2.
|
Platform test (8.0)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires infection/infection ^0.31.2 -> satisfiable by infection/infection[0.31.2, 0.31.x-dev].
- infection/infection[0.31.2, ..., 0.31.x-dev] require php ^8.2 -> your php version (8.0.30) does not satisfy that requirement.
|
Platform test (7.4)
Process completed with exit code 2.
|
Platform test (7.4)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires infection/infection ^0.31.2 -> satisfiable by infection/infection[0.31.2, 0.31.x-dev].
- infection/infection[0.31.2, ..., 0.31.x-dev] require php ^8.2 -> your php version (7.4.33) does not satisfy that requirement.
|
Platform test (8.1)
Process completed with exit code 2.
|
Platform test (8.1)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires infection/infection ^0.31.2 -> satisfiable by infection/infection[0.31.2, 0.31.x-dev].
- infection/infection[0.31.2, ..., 0.31.x-dev] require php ^8.2 -> your php version (8.1.33) does not satisfy that requirement.
|
Platform test (8.1, doctrine/orm:^3.0 doctrine/dbal:^4.0 carbonphp/carbon-doctrine-types:^3 gedmo...
Process completed with exit code 2.
|
Platform test (8.1, doctrine/orm:^3.0 doctrine/dbal:^4.0 carbonphp/carbon-doctrine-types:^3 gedmo...
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires infection/infection ^0.31.2 -> satisfiable by infection/infection[0.31.2, 0.31.x-dev].
- infection/infection[0.31.2, ..., 0.31.x-dev] require php ^8.2 -> your php version (8.1.33) does not satisfy that requirement.
|
Platform test (8.4, true):
src/Type/Doctrine/Query/QueryResultTypeWalker.php#L784
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
$exprTypeNoNull = TypeCombinator::removeNull($exprType);
$nullable = $this->canBeNull($exprType) || $this->hasAggregateWithoutGroupBy();
if ($this->driverType === DriverDetector::SQLITE3 || $this->driverType === DriverDetector::PDO_SQLITE) {
- if ($exprTypeNoNull->isString()->yes() && !$exprTypeNoNull->isNumericString()->yes()) {
+ if ($exprTypeNoNull->isString()->yes() && !!$exprTypeNoNull->isNumericString()->no()) {
return $this->createFloat($nullable);
}
return $this->generalizeConstantType($exprType, $nullable);
|
Platform test (8.4, true):
src/Type/Doctrine/Query/QueryResultTypeWalker.php#L784
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
$exprTypeNoNull = TypeCombinator::removeNull($exprType);
$nullable = $this->canBeNull($exprType) || $this->hasAggregateWithoutGroupBy();
if ($this->driverType === DriverDetector::SQLITE3 || $this->driverType === DriverDetector::PDO_SQLITE) {
- if ($exprTypeNoNull->isString()->yes() && !$exprTypeNoNull->isNumericString()->yes()) {
+ if (!$exprTypeNoNull->isString()->no() && !$exprTypeNoNull->isNumericString()->yes()) {
return $this->createFloat($nullable);
}
return $this->generalizeConstantType($exprType, $nullable);
|
Platform test (8.4, true):
src/Type/Doctrine/Query/QueryResultTypeWalker.php#L575
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
$secondExprType = $this->unmarshalType($this->walkSimpleArithmeticExpression($function->secondSimpleArithmeticExpression));
$union = TypeCombinator::union($firstExprType, $secondExprType);
$unionNoNull = TypeCombinator::removeNull($union);
- if (!$unionNoNull->isInteger()->yes()) {
+ if (!!$unionNoNull->isInteger()->no()) {
return $this->marshalType(new MixedType());
// dont try to deal with non-integer chaos
}
|
Platform test (8.4, true):
src/Type/Doctrine/HydrationModeReturnTypeResolver.php#L94
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
}
private function getSimpleObjectHydratedReturnType(Type $queryResultType): ?Type
{
- if ((new ObjectWithoutClassType())->isSuperTypeOf($queryResultType)->yes()) {
+ if (!(new ObjectWithoutClassType())->isSuperTypeOf($queryResultType)->no()) {
return $queryResultType;
}
return null;
}
}
|
Platform test (8.4, true):
src/Type/Doctrine/HydrationModeReturnTypeResolver.php#L79
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
case 'toIterable':
return new IterableType($queryKeyType->isNull()->yes() ? new IntegerType() : $queryKeyType, $queryResultType);
default:
- if ($queryKeyType->isNull()->yes()) {
+ if (!$queryKeyType->isNull()->no()) {
return TypeCombinator::intersect(new ArrayType(new IntegerType(), $queryResultType), new AccessoryArrayListType());
}
return new ArrayType($queryKeyType, $queryResultType);
|
Platform test (8.4, true):
src/Type/Doctrine/HydrationModeReturnTypeResolver.php#L75
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
}
return $nullableQueryResultType;
case 'toIterable':
- return new IterableType($queryKeyType->isNull()->yes() ? new IntegerType() : $queryKeyType, $queryResultType);
+ return new IterableType(!$queryKeyType->isNull()->no() ? new IntegerType() : $queryKeyType, $queryResultType);
default:
if ($queryKeyType->isNull()->yes()) {
return TypeCombinator::intersect(new ArrayType(new IntegerType(), $queryResultType), new AccessoryArrayListType());
|
Platform test (8.4, true):
src/Type/Doctrine/EntityManagerInterfaceThrowTypeExtension.php#L38
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
public function getThrowTypeFromMethodCall(MethodReflection $methodReflection, MethodCall $methodCall, Scope $scope): ?Type
{
$type = $scope->getType($methodCall->var);
- if ((new ObjectType(EntityManagerInterface::class))->isSuperTypeOf($type)->yes()) {
+ if (!(new ObjectType(EntityManagerInterface::class))->isSuperTypeOf($type)->no()) {
return TypeCombinator::union(...array_map(static fn($class): Type => new ObjectType($class), self::SUPPORTED_METHOD[$methodReflection->getName()]));
}
return $methodReflection->getThrowType();
}
}
|
Platform test (8.4, true):
src/Rules/Doctrine/ORM/EntityRelationRule.php#L112
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
}
$collectionObjectType = new ObjectType('Doctrine\Common\Collections\Collection');
$propertyTypeToCheckAgainst = $propertyType;
- if ($toMany && $collectionObjectType->isSuperTypeOf($propertyType)->yes() && $propertyType->isIterable()->yes()) {
+ if ($toMany && $collectionObjectType->isSuperTypeOf($propertyType)->yes() && !$propertyType->isIterable()->no()) {
$propertyTypeToCheckAgainst = TypeCombinator::intersect($collectionObjectType, new IterableType(new MixedType(true), $propertyType->getIterableValueType()));
}
if (!$propertyTypeToCheckAgainst->isSuperTypeOf($columnType)->yes()) {
|
Platform test (8.4, true):
src/Rules/Doctrine/ORM/EntityRelationRule.php#L111
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
}
$collectionObjectType = new ObjectType('Doctrine\Common\Collections\Collection');
$propertyTypeToCheckAgainst = $propertyType;
- if ($toMany && $collectionObjectType->isSuperTypeOf($propertyType)->yes() && $propertyType->isIterable()->yes()) {
+ if ($toMany && !$collectionObjectType->isSuperTypeOf($propertyType)->no() && $propertyType->isIterable()->yes()) {
$propertyTypeToCheckAgainst = TypeCombinator::intersect($collectionObjectType, new IterableType(new MixedType(true), $propertyType->getIterableValueType()));
}
if (!$propertyTypeToCheckAgainst->isSuperTypeOf($columnType)->yes()) {
|
Platform test (8.4, true):
src/Rules/Doctrine/ORM/DqlRule.php#L52
Escaped Mutant for Mutator "TrinaryLogicMutator":
@@ @@
}
$calledOnType = $scope->getType($node->var);
$entityManagerInterface = 'Doctrine\ORM\EntityManagerInterface';
- if (!(new ObjectType($entityManagerInterface))->isSuperTypeOf($calledOnType)->yes()) {
+ if (!!(new ObjectType($entityManagerInterface))->isSuperTypeOf($calledOnType)->no()) {
return [];
}
$dqls = $scope->getType($node->getArgs()[0]->value)->getConstantStrings();
|