Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions src/Type/Traits/LateResolvableTypeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use PHPStan\Type\LateResolvableType;
use PHPStan\Type\NeverType;
use PHPStan\Type\Type;
use PHPStan\Type\UnionType;

trait LateResolvableTypeTrait
{
Expand Down Expand Up @@ -65,6 +66,18 @@ private function isSuperTypeOfDefault(Type $type): IsSuperTypeOfResult
return IsSuperTypeOfResult::createYes();
}

if ($this->equals($type)) {
return IsSuperTypeOfResult::createYes();
}

if ($type instanceof UnionType) {
foreach ($type->getTypes() as $innerType) {
if ($this->equals($innerType)) {
return IsSuperTypeOfResult::createYes();
}
}
}

if ($type instanceof LateResolvableType) {
$type = $type->resolve();
}
Expand Down Expand Up @@ -570,6 +583,18 @@ public function tryRemove(Type $typeToRemove): ?Type

public function isSubTypeOf(Type $otherType): IsSuperTypeOfResult
{
if ($this->equals($otherType)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd make sense to write some tests that test this method directly. Similar to this:

/**
* @return Iterator<array-key, array{UnionType, Type, TrinaryLogic}>
*/
public static function dataIsSuperTypeOf(): Iterator
{
$int = new IntegerType();
$string = new StringType();
$unionTypeA = new UnionType([
$int,
$string,
]);
yield [
$unionTypeA,
$int,
TrinaryLogic::createYes(),
];
yield [
$unionTypeA,
$string,
TrinaryLogic::createYes(),
];
yield [
$unionTypeA,
$unionTypeA,
TrinaryLogic::createYes(),
];
yield [
$unionTypeA,
new IntersectionType([new StringType(), new CallableType()]),
TrinaryLogic::createYes(),
];
yield [
$unionTypeA,
new MixedType(),
TrinaryLogic::createMaybe(),
];
yield [
$unionTypeA,
new CallableType(),
TrinaryLogic::createMaybe(),
];
yield [
$unionTypeA,
new UnionType([new IntegerType(), new FloatType()]),
TrinaryLogic::createMaybe(),
];
yield [
$unionTypeA,
new UnionType([new CallableType(), new FloatType()]),
TrinaryLogic::createMaybe(),
];
yield [
$unionTypeA,
new IntersectionType([new MixedType(), new CallableType()]),
TrinaryLogic::createMaybe(),
];
yield [
$unionTypeA,
new FloatType(),
TrinaryLogic::createNo(),
];
yield [
$unionTypeA,
new UnionType([new ConstantBooleanType(true), new FloatType()]),
TrinaryLogic::createNo(),
];
yield [
$unionTypeA,
new IterableType(new MixedType(), new MixedType()),
TrinaryLogic::createNo(),
];
yield [
$unionTypeA,
new IntersectionType([new ArrayType(new MixedType(), new MixedType()), new CallableType()]),
TrinaryLogic::createNo(),
];
$intersectionTypeB = new IntersectionType([
new ObjectType('ArrayObject'),
new IterableType(new MixedType(), new ObjectType('DatePeriod')),
]);
$arrayTypeB = new ArrayType(new MixedType(), new ObjectType('DatePeriod'));
$unionTypeB = new UnionType([
$intersectionTypeB,
$arrayTypeB,
]);
yield [
$unionTypeB,
$intersectionTypeB,
TrinaryLogic::createYes(),
];
yield [
$unionTypeB,
$arrayTypeB,
TrinaryLogic::createYes(),
];
yield [
$unionTypeB,
$unionTypeB,
TrinaryLogic::createYes(),
];
yield [
$unionTypeB,
new MixedType(),
TrinaryLogic::createMaybe(),
];
yield [
$unionTypeB,
new ObjectType('ArrayObject'),
TrinaryLogic::createMaybe(),
];
yield [
$unionTypeB,
new IterableType(new MixedType(), new ObjectType('DatePeriod')),
TrinaryLogic::createMaybe(),
];
yield [
$unionTypeB,
new IterableType(new MixedType(), new MixedType()),
TrinaryLogic::createMaybe(),
];
yield [
$unionTypeB,
new StringType(),
TrinaryLogic::createNo(),
];
yield [
$unionTypeB,
new IntegerType(),
TrinaryLogic::createNo(),
];
yield [
$unionTypeB,
new ObjectType(stdClass::class),
TrinaryLogic::createNo(),
];
yield [
$unionTypeB,
new IterableType(new MixedType(), new ObjectType('DateTime')),
TrinaryLogic::createNo(),
];
yield [
$unionTypeB,
new CallableType(),
TrinaryLogic::createMaybe(),
];
yield [
$unionTypeB,
new IntersectionType([new MixedType(), new CallableType()]),
TrinaryLogic::createMaybe(),
];
yield [
$unionTypeB,
new IntersectionType([new StringType(), new CallableType()]),
TrinaryLogic::createNo(),
];
yield 'is super type of template-of-union with same members' => [
new UnionType([
new IntegerType(),
new FloatType(),
]),
TemplateTypeFactory::create(
TemplateTypeScope::createWithClass('Foo'),
'T',
new UnionType([
new IntegerType(),
new FloatType(),
]),
TemplateTypeVariance::createInvariant(),
),
TrinaryLogic::createYes(),
];
yield 'is super type of template-of-union equal to a union member' => [
new UnionType([
TemplateTypeFactory::create(
TemplateTypeScope::createWithClass('Foo'),
'T',
new UnionType([
new IntegerType(),
new FloatType(),
]),
TemplateTypeVariance::createInvariant(),
),
new NullType(),
]),
TemplateTypeFactory::create(
TemplateTypeScope::createWithClass('Foo'),
'T',
new UnionType([
new IntegerType(),
new FloatType(),
]),
TemplateTypeVariance::createInvariant(),
),
TrinaryLogic::createYes(),
];
yield 'maybe super type of template-of-union equal to a union member' => [
new UnionType([
TemplateTypeFactory::create(
TemplateTypeScope::createWithClass('Foo'),
'T',
new UnionType([
new IntegerType(),
new FloatType(),
]),
TemplateTypeVariance::createInvariant(),
),
new NullType(),
]),
TemplateTypeFactory::create(
TemplateTypeScope::createWithClass('Bar'),
'T',
new UnionType([
new IntegerType(),
new FloatType(),
]),
TemplateTypeVariance::createInvariant(),
),
TrinaryLogic::createMaybe(),
];
yield 'is super type of template-of-string equal to a union member' => [
new UnionType([
TemplateTypeFactory::create(
TemplateTypeScope::createWithClass('Foo'),
'T',
new StringType(),
TemplateTypeVariance::createInvariant(),
),
new NullType(),
]),
TemplateTypeFactory::create(
TemplateTypeScope::createWithClass('Foo'),
'T',
new StringType(),
TemplateTypeVariance::createInvariant(),
),
TrinaryLogic::createYes(),
];
yield 'maybe super type of template-of-string sub type of a union member' => [
new UnionType([
TemplateTypeFactory::create(
TemplateTypeScope::createWithClass('Foo'),
'T',
new StringType(),
TemplateTypeVariance::createInvariant(),
),
new NullType(),
]),
TemplateTypeFactory::create(
TemplateTypeScope::createWithClass('Bar'),
'T',
new StringType(),
TemplateTypeVariance::createInvariant(),
),
TrinaryLogic::createMaybe(),
];
}
#[DataProvider('dataIsSuperTypeOf')]
public function testIsSuperTypeOf(UnionType $type, Type $otherType, TrinaryLogic $expectedResult): void
{
$actualResult = $type->isSuperTypeOf($otherType);
$this->assertSame(
$expectedResult->describe(),
$actualResult->describe(),
sprintf('%s -> isSuperTypeOf(%s)', $type->describe(VerbosityLevel::precise()), $otherType->describe(VerbosityLevel::precise())),
);
}

Also, please review and maybe fix the isSuperTypeOf method as well.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented; please take a look

0ba6805

return IsSuperTypeOfResult::createYes();
}

if ($otherType instanceof UnionType) {
foreach ($otherType->getTypes() as $innerType) {
if ($this->equals($innerType)) {
return IsSuperTypeOfResult::createYes();
}
}
}

$result = $this->resolve();

if ($result instanceof CompoundType) {
Expand Down
7 changes: 7 additions & 0 deletions tests/PHPStan/Rules/Methods/MethodSignatureRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,13 @@ public function testBug10488(): void
$this->analyse([__DIR__ . '/data/bug-10488.php'], []);
}

public function testBug10942(): void
{
$this->reportMaybes = true;
$this->reportStatic = true;
$this->analyse([__DIR__ . '/data/bug-10942.php'], []);
}

#[RequiresPhp('>= 8.0')]
public function testBug12073(): void
{
Expand Down
27 changes: 27 additions & 0 deletions tests/PHPStan/Rules/Methods/data/bug-10942.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php declare(strict_types = 1);

namespace Bug10942;

class A
{

/**
* @param string|($operator is 'in' ? int : never) $sqlRight
*/
protected function _renderConditionBinary(string $operator, string $sqlLeft, $sqlRight): string
{
return 'x';
}

}

class B extends A
{

#[\Override]
protected function _renderConditionBinary(string $operator, string $sqlLeft, $sqlRight): string
{
return 'y';
}

}
78 changes: 78 additions & 0 deletions tests/PHPStan/Type/LateResolvableTypeTraitTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?php declare(strict_types = 1);

namespace PHPStan\Type;

use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\TrinaryLogic;
use PHPStan\Type\IntegerType;
use PHPStan\Type\NeverType;
use PHPStan\Type\StringType;
use PHPStan\Type\Type;
use PHPStan\Type\ConditionalTypeForParameter;
use PHPStan\Type\UnionType;
use PHPUnit\Framework\TestCase;
use PHPUnit\Framework\Attributes\DataProvider;

class LateResolvableTypeTraitTest extends TestCase
{
public static function dataIsSuperTypeOf(): array
{
return self::provideCases();
}

public static function dataIsSubTypeOf(): array
{
return self::provideCases();
}

private static function createConditional(
string $parameterName = '$operator',
string $targetLiteral = 'in',
?Type $ifType = null,
?Type $elseType = null,
bool $negated = false,
): ConditionalTypeForParameter
{
return new ConditionalTypeForParameter(
$parameterName,
new ConstantStringType($targetLiteral),
$ifType ?? new IntegerType(),
$elseType ?? new NeverType(),
$negated,
);
}

/**
* @return list<array{Type, Type, TrinaryLogic}>
*/
private static function provideCases(): array
{
return [

Check failure on line 50 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.2)

Method PHPStan\Type\LateResolvableTypeTraitTest::provideCases() should return list<array{PHPStan\Type\Type, PHPStan\Type\Type, PHPStan\TrinaryLogic}> but returns array{'conditional vs same conditional': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\ConditionalTypeForParameter, PHPStan\TrinaryLogic}, 'conditional vs union containing it': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\UnionType, PHPStan\TrinaryLogic}}.

Check failure on line 50 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.4, ubuntu-latest)

Method PHPStan\Type\LateResolvableTypeTraitTest::provideCases() should return list<array{PHPStan\Type\Type, PHPStan\Type\Type, PHPStan\TrinaryLogic}> but returns array{'conditional vs same conditional': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\ConditionalTypeForParameter, PHPStan\TrinaryLogic}, 'conditional vs union containing it': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\UnionType, PHPStan\TrinaryLogic}}.

Check failure on line 50 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.5, ubuntu-latest)

Method PHPStan\Type\LateResolvableTypeTraitTest::provideCases() should return list<array{PHPStan\Type\Type, PHPStan\Type\Type, PHPStan\TrinaryLogic}> but returns array{'conditional vs same conditional': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\ConditionalTypeForParameter, PHPStan\TrinaryLogic}, 'conditional vs union containing it': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\UnionType, PHPStan\TrinaryLogic}}.

Check failure on line 50 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, ubuntu-latest)

Method PHPStan\Type\LateResolvableTypeTraitTest::provideCases() should return list<array{PHPStan\Type\Type, PHPStan\Type\Type, PHPStan\TrinaryLogic}> but returns array{'conditional vs same conditional': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\ConditionalTypeForParameter, PHPStan\TrinaryLogic}, 'conditional vs union containing it': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\UnionType, PHPStan\TrinaryLogic}}.

Check failure on line 50 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.3)

Method PHPStan\Type\LateResolvableTypeTraitTest::provideCases() should return list<array{PHPStan\Type\Type, PHPStan\Type\Type, PHPStan\TrinaryLogic}> but returns array{'conditional vs same conditional': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\ConditionalTypeForParameter, PHPStan\TrinaryLogic}, 'conditional vs union containing it': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\UnionType, PHPStan\TrinaryLogic}}.

Check failure on line 50 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.5)

Method PHPStan\Type\LateResolvableTypeTraitTest::provideCases() should return list<array{PHPStan\Type\Type, PHPStan\Type\Type, PHPStan\TrinaryLogic}> but returns array{'conditional vs same conditional': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\ConditionalTypeForParameter, PHPStan\TrinaryLogic}, 'conditional vs union containing it': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\UnionType, PHPStan\TrinaryLogic}}.

Check failure on line 50 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, ubuntu-latest)

Method PHPStan\Type\LateResolvableTypeTraitTest::provideCases() should return list<array{PHPStan\Type\Type, PHPStan\Type\Type, PHPStan\TrinaryLogic}> but returns array{'conditional vs same conditional': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\ConditionalTypeForParameter, PHPStan\TrinaryLogic}, 'conditional vs union containing it': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\UnionType, PHPStan\TrinaryLogic}}.

Check failure on line 50 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.4)

Method PHPStan\Type\LateResolvableTypeTraitTest::provideCases() should return list<array{PHPStan\Type\Type, PHPStan\Type\Type, PHPStan\TrinaryLogic}> but returns array{'conditional vs same conditional': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\ConditionalTypeForParameter, PHPStan\TrinaryLogic}, 'conditional vs union containing it': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\UnionType, PHPStan\TrinaryLogic}}.

Check failure on line 50 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, ubuntu-latest)

Method PHPStan\Type\LateResolvableTypeTraitTest::provideCases() should return list<array{PHPStan\Type\Type, PHPStan\Type\Type, PHPStan\TrinaryLogic}> but returns array{'conditional vs same conditional': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\ConditionalTypeForParameter, PHPStan\TrinaryLogic}, 'conditional vs union containing it': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\UnionType, PHPStan\TrinaryLogic}}.

Check failure on line 50 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, ubuntu-latest)

Method PHPStan\Type\LateResolvableTypeTraitTest::provideCases() should return list<array{PHPStan\Type\Type, PHPStan\Type\Type, PHPStan\TrinaryLogic}> but returns array{'conditional vs same conditional': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\ConditionalTypeForParameter, PHPStan\TrinaryLogic}, 'conditional vs union containing it': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\UnionType, PHPStan\TrinaryLogic}}.

Check failure on line 50 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.4, windows-latest)

Method PHPStan\Type\LateResolvableTypeTraitTest::provideCases() should return list<array{PHPStan\Type\Type, PHPStan\Type\Type, PHPStan\TrinaryLogic}> but returns array{'conditional vs same conditional': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\ConditionalTypeForParameter, PHPStan\TrinaryLogic}, 'conditional vs union containing it': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\UnionType, PHPStan\TrinaryLogic}}.

Check failure on line 50 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.5, windows-latest)

Method PHPStan\Type\LateResolvableTypeTraitTest::provideCases() should return list<array{PHPStan\Type\Type, PHPStan\Type\Type, PHPStan\TrinaryLogic}> but returns array{'conditional vs same conditional': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\ConditionalTypeForParameter, PHPStan\TrinaryLogic}, 'conditional vs union containing it': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\UnionType, PHPStan\TrinaryLogic}}.

Check failure on line 50 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, windows-latest)

Method PHPStan\Type\LateResolvableTypeTraitTest::provideCases() should return list<array{PHPStan\Type\Type, PHPStan\Type\Type, PHPStan\TrinaryLogic}> but returns array{'conditional vs same conditional': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\ConditionalTypeForParameter, PHPStan\TrinaryLogic}, 'conditional vs union containing it': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\UnionType, PHPStan\TrinaryLogic}}.

Check failure on line 50 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, windows-latest)

Method PHPStan\Type\LateResolvableTypeTraitTest::provideCases() should return list<array{PHPStan\Type\Type, PHPStan\Type\Type, PHPStan\TrinaryLogic}> but returns array{'conditional vs same conditional': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\ConditionalTypeForParameter, PHPStan\TrinaryLogic}, 'conditional vs union containing it': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\UnionType, PHPStan\TrinaryLogic}}.

Check failure on line 50 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, windows-latest)

Method PHPStan\Type\LateResolvableTypeTraitTest::provideCases() should return list<array{PHPStan\Type\Type, PHPStan\Type\Type, PHPStan\TrinaryLogic}> but returns array{'conditional vs same conditional': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\ConditionalTypeForParameter, PHPStan\TrinaryLogic}, 'conditional vs union containing it': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\UnionType, PHPStan\TrinaryLogic}}.

Check failure on line 50 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, windows-latest)

Method PHPStan\Type\LateResolvableTypeTraitTest::provideCases() should return list<array{PHPStan\Type\Type, PHPStan\Type\Type, PHPStan\TrinaryLogic}> but returns array{'conditional vs same conditional': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\ConditionalTypeForParameter, PHPStan\TrinaryLogic}, 'conditional vs union containing it': array{PHPStan\Type\ConditionalTypeForParameter, PHPStan\Type\UnionType, PHPStan\TrinaryLogic}}.
'conditional vs same conditional' => [
self::createConditional(),
self::createConditional(),
TrinaryLogic::createYes(),
],
'conditional vs union containing it' => [
self::createConditional(),
new UnionType([new StringType(), self::createConditional()]),
TrinaryLogic::createYes(),
],
];
}

#[DataProvider('dataIsSuperTypeOf')]
public function testIsSuperTypeOf(Type $left, Type $right, TrinaryLogic $expected): void
{
$actual = $left->isSuperTypeOf($right);
$this->assertSame($expected->describe(), $actual->describe());
}

#[DataProvider('dataIsSubTypeOf')]
public function testIsSubTypeOf(Type $left, Type $right, TrinaryLogic $expected): void
{
$actual = $left->isSubTypeOf($right);

Check failure on line 74 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.2)

Call to an undefined method PHPStan\Type\Type::isSubTypeOf().

Check failure on line 74 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.4, ubuntu-latest)

Call to an undefined method PHPStan\Type\Type::isSubTypeOf().

Check failure on line 74 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.5, ubuntu-latest)

Call to an undefined method PHPStan\Type\Type::isSubTypeOf().

Check failure on line 74 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, ubuntu-latest)

Call to an undefined method PHPStan\Type\Type::isSubTypeOf().

Check failure on line 74 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.3)

Call to an undefined method PHPStan\Type\Type::isSubTypeOf().

Check failure on line 74 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.5)

Call to an undefined method PHPStan\Type\Type::isSubTypeOf().

Check failure on line 74 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, ubuntu-latest)

Call to an undefined method PHPStan\Type\Type::isSubTypeOf().

Check failure on line 74 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan with result cache (8.4)

Call to an undefined method PHPStan\Type\Type::isSubTypeOf().

Check failure on line 74 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.4, windows-latest)

Call to an undefined method PHPStan\Type\Type::isSubTypeOf().

Check failure on line 74 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.5, windows-latest)

Call to an undefined method PHPStan\Type\Type::isSubTypeOf().

Check failure on line 74 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.3, windows-latest)

Call to an undefined method PHPStan\Type\Type::isSubTypeOf().

Check failure on line 74 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.2, windows-latest)

Call to an undefined method PHPStan\Type\Type::isSubTypeOf().
$this->assertSame($expected->describe(), $actual->describe());
}

}

Check failure on line 78 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, ubuntu-latest)

Call to an undefined method PHPStan\Type\Type::isSubTypeOf().

Check failure on line 78 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, ubuntu-latest)

Call to an undefined method PHPStan\Type\Type::isSubTypeOf().

Check failure on line 78 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, windows-latest)

Call to an undefined method PHPStan\Type\Type::isSubTypeOf().

Check failure on line 78 in tests/PHPStan/Type/LateResolvableTypeTraitTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, windows-latest)

Call to an undefined method PHPStan\Type\Type::isSubTypeOf().
Loading