Skip to content
Draft
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
8 changes: 4 additions & 4 deletions src/Analyser/TypeSpecifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ private function specifyTypesForCountFuncCall(

if (
$sizeType instanceof ConstantIntegerType
&& $sizeType->getValue() < ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT
&& $sizeType->getValue() < ConstantArrayTypeBuilder::getArrayCountLimit()
&& $isList->yes()
&& $arrayType->getKeyType()->isSuperTypeOf(IntegerRangeType::fromInterval(0, $sizeType->getValue() - 1))->yes()
) {
Expand All @@ -1168,7 +1168,7 @@ private function specifyTypesForCountFuncCall(
if (
$sizeType instanceof IntegerRangeType
&& $sizeType->getMin() !== null
&& $sizeType->getMin() < ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT
&& $sizeType->getMin() < ConstantArrayTypeBuilder::getArrayCountLimit()
&& $isList->yes()
&& $arrayType->getKeyType()->isSuperTypeOf(IntegerRangeType::fromInterval(0, ($sizeType->getMax() ?? $sizeType->getMin()) - 1))->yes()
) {
Expand All @@ -1179,7 +1179,7 @@ private function specifyTypesForCountFuncCall(
$builderData[] = [$offsetType, $arrayType->getOffsetValueType($offsetType), false];
}
if ($sizeType->getMax() !== null) {
if ($sizeType->getMax() - $sizeType->getMin() > ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT) {
if ($sizeType->getMax() - $sizeType->getMin() > ConstantArrayTypeBuilder::getArrayCountLimit()) {
$resultTypes[] = $arrayType;
continue;
}
Expand All @@ -1201,7 +1201,7 @@ private function specifyTypesForCountFuncCall(
continue;
}

if (count($builderData) > ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT) {
if (count($builderData) > ConstantArrayTypeBuilder::getArrayCountLimit()) {
$resultTypes[] = $arrayType;
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/PhpDoc/TypeNodeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ function (CallableTypeParameterNode $parameterNode) use ($nameScope, &$isVariadi
private function resolveArrayShapeNode(ArrayShapeNode $typeNode, NameScope $nameScope): Type
{
$builder = ConstantArrayTypeBuilder::createEmpty();
if (count($typeNode->items) > ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT) {
if (count($typeNode->items) > ConstantArrayTypeBuilder::getArrayCountLimit()) {
$builder->degradeToGeneralArray(true);
}

Expand Down
4 changes: 2 additions & 2 deletions src/Reflection/InitializerExprTypeResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ public function resolveConcatType(Type $left, Type $right): Type
*/
public function getArrayType(Expr\Array_ $expr, callable $getTypeCallback): Type
{
if (count($expr->items) > ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT) {
if (count($expr->items) > ConstantArrayTypeBuilder::getArrayCountLimit()) {
return $this->oversizedArrayBuilder->build($expr, $getTypeCallback);
}

Expand Down Expand Up @@ -1464,7 +1464,7 @@ public function getPlusTypeFromTypes(Expr $left, Expr $right, Type $leftType, Ty
$leftCount = count($leftConstantArrays);
$rightCount = count($rightConstantArrays);
if ($leftCount > 0 && $rightCount > 0
&& ($leftCount + $rightCount < ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT)) {
&& ($leftCount + $rightCount < ConstantArrayTypeBuilder::getArrayCountLimit())) {
$resultTypes = [];
foreach ($rightConstantArrays as $rightConstantArray) {
foreach ($leftConstantArrays as $leftConstantArray) {
Expand Down
26 changes: 21 additions & 5 deletions src/Type/Constant/ConstantArrayTypeBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
final class ConstantArrayTypeBuilder
{

public const ARRAY_COUNT_LIMIT = 256;
/**
* @internal Use getArrayCountLimit() instead
*/
public const ARRAY_COUNT_LIMIT = 512;
private const CLOSURES_COUNT_LIMIT = 16;

private bool $degradeToGeneralArray = false;
Expand All @@ -39,6 +42,8 @@ final class ConstantArrayTypeBuilder

private bool $oversized = false;

private static int $arrayCountLimit = self::ARRAY_COUNT_LIMIT;

/**
* @param list<Type> $keyTypes
* @param array<int, Type> $valueTypes
Expand Down Expand Up @@ -70,13 +75,24 @@ public static function createFromConstantArray(ConstantArrayType $startArrayType
$startArrayType->isList(),
);

if (count($startArrayType->getKeyTypes()) > self::ARRAY_COUNT_LIMIT) {
if (count($startArrayType->getKeyTypes()) > self::getArrayCountLimit()) {
$builder->degradeToGeneralArray(true);
}

return $builder;
}

/** @internal */
public static function setArrayCountLimit(int $limit): void
{
self::$arrayCountLimit = $limit;
}

public static function getArrayCountLimit(): int
{
return self::$arrayCountLimit;
}

public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $optional = false): void
{
if ($offsetType !== null) {
Expand Down Expand Up @@ -147,7 +163,7 @@ public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $opt
$this->optionalKeys[] = count($this->keyTypes) - 1;
}

if (count($this->keyTypes) > self::ARRAY_COUNT_LIMIT) {
if (count($this->keyTypes) > self::getArrayCountLimit()) {
$this->degradeToGeneralArray = true;
$this->oversized = true;
}
Expand Down Expand Up @@ -220,7 +236,7 @@ public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $opt
$this->optionalKeys[] = count($this->keyTypes) - 1;
}

if (count($this->keyTypes) > self::ARRAY_COUNT_LIMIT) {
if (count($this->keyTypes) > self::getArrayCountLimit()) {
$this->degradeToGeneralArray = true;
$this->oversized = true;
}
Expand All @@ -244,7 +260,7 @@ public function setOffsetValueType(?Type $offsetType, Type $valueType, bool $opt
}
}
}
if (count($scalarTypes) > 0 && count($scalarTypes) < self::ARRAY_COUNT_LIMIT) {
if (count($scalarTypes) > 0 && count($scalarTypes) < self::getArrayCountLimit()) {
$match = true;
$valueTypes = $this->valueTypes;
foreach ($scalarTypes as $scalarType) {
Expand Down
2 changes: 1 addition & 1 deletion src/Type/ConstantTypeHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static function getTypeFromValue($value): Type
return new ConstantStringType($value);
} elseif (is_array($value)) {
$arrayBuilder = ConstantArrayTypeBuilder::createEmpty();
if (count($value) > ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT) {
if (count($value) > ConstantArrayTypeBuilder::getArrayCountLimit()) {
$arrayBuilder->degradeToGeneralArray(true);
}
foreach ($value as $k => $v) {
Expand Down
2 changes: 1 addition & 1 deletion src/Type/Php/ArrayMapFunctionReturnTypeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function getTypeFromFunctionCall(FunctionReflection $functionReflection,
if (count($constantArrays) > 0) {
$arrayTypes = [];
$totalCount = TypeCombinator::countConstantArrayValueTypes($constantArrays) * TypeCombinator::countConstantArrayValueTypes([$valueType]);
if ($totalCount < ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT) {
if ($totalCount < ConstantArrayTypeBuilder::getArrayCountLimit()) {
foreach ($constantArrays as $constantArray) {
$returnedArrayBuilder = ConstantArrayTypeBuilder::createEmpty();
$valueTypes = $constantArray->getValueTypes();
Expand Down
4 changes: 2 additions & 2 deletions src/Type/TypeCombinator.php
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ private static function optimizeConstantArrays(array $types): array
{
$constantArrayValuesCount = self::countConstantArrayValueTypes($types);

if ($constantArrayValuesCount <= ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT) {
if ($constantArrayValuesCount <= ConstantArrayTypeBuilder::getArrayCountLimit()) {
return $types;
}

Expand Down Expand Up @@ -991,7 +991,7 @@ private static function optimizeConstantArrays(array $types): array
$keyType = self::union(...$keyTypes);
$valueType = self::union(...$valueTypes);

if ($valueType instanceof UnionType && count($valueType->getTypes()) > ConstantArrayTypeBuilder::ARRAY_COUNT_LIMIT) {
if ($valueType instanceof UnionType && count($valueType->getTypes()) > ConstantArrayTypeBuilder::getArrayCountLimit()) {
$valueType = $valueType->generalize(GeneralizePrecision::lessSpecific());
}

Expand Down
6 changes: 6 additions & 0 deletions tests/PHPStan/Analyser/AnalyserIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,12 @@
use PHPStan\Reflection\InitializerExprTypeResolver;
use PHPStan\Reflection\SignatureMap\SignatureMapProvider;
use PHPStan\Testing\PHPStanTestCase;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPUnit\Framework\Attributes\CoversNothing;
use PHPUnit\Framework\Attributes\RequiresPhp;
use PHPUnit\Framework\Attributes\RunInSeparateProcess;
use function extension_loaded;
use function sprintf;
use const PHP_VERSION_ID;
Expand Down Expand Up @@ -1107,7 +1109,7 @@
$this->assertNoErrors($errors);
}

#[RequiresPhp('>= 8.2')]

Check failure on line 1112 in tests/PHPStan/Analyser/AnalyserIntegrationTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, ubuntu-latest)

Attribute class PHPUnit\Framework\Attributes\RunInSeparateProcess does not exist.

Check failure on line 1112 in tests/PHPStan/Analyser/AnalyserIntegrationTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, ubuntu-latest)

Attribute class PHPUnit\Framework\Attributes\RunInSeparateProcess does not exist.

Check failure on line 1112 in tests/PHPStan/Analyser/AnalyserIntegrationTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, windows-latest)

Attribute class PHPUnit\Framework\Attributes\RunInSeparateProcess does not exist.

Check failure on line 1112 in tests/PHPStan/Analyser/AnalyserIntegrationTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, windows-latest)

Attribute class PHPUnit\Framework\Attributes\RunInSeparateProcess does not exist.
public function testAssertDocblock(): void
{
$errors = $this->runAnalyse(__DIR__ . '/nsrt/assert-docblock.php');
Expand Down Expand Up @@ -1201,8 +1203,12 @@
];
}

/** @runInSeparateProcess */
#[RunInSeparateProcess]
public function testBug8004(): void
{
ConstantArrayTypeBuilder::setArrayCountLimit(256);

$errors = $this->runAnalyse(__DIR__ . '/data/bug-8004.php');
$this->assertCount(2, $errors);
$this->assertSame('Strict comparison using !== between null and DateTimeInterface|string will always evaluate to true.', $errors[0]->getMessage());
Expand Down
8 changes: 8 additions & 0 deletions tests/PHPStan/Analyser/NodeScopeResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
use EnumTypeAssertions\Foo;
use PHPStan\File\FileHelper;
use PHPStan\Testing\TypeInferenceTestCase;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\RunClassInSeparateProcess;
use stdClass;
use function array_merge;
use function define;
Expand All @@ -19,6 +21,10 @@
use const PHP_INT_SIZE;
use const PHP_VERSION_ID;

/**
* @runInSeparateProcess
*/
#[RunClassInSeparateProcess]

Check failure on line 27 in tests/PHPStan/Analyser/NodeScopeResolverTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, ubuntu-latest)

Attribute class PHPUnit\Framework\Attributes\RunClassInSeparateProcess does not exist.

Check failure on line 27 in tests/PHPStan/Analyser/NodeScopeResolverTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, ubuntu-latest)

Attribute class PHPUnit\Framework\Attributes\RunClassInSeparateProcess does not exist.

Check failure on line 27 in tests/PHPStan/Analyser/NodeScopeResolverTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, windows-latest)

Attribute class PHPUnit\Framework\Attributes\RunClassInSeparateProcess does not exist.

Check failure on line 27 in tests/PHPStan/Analyser/NodeScopeResolverTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, windows-latest)

Attribute class PHPUnit\Framework\Attributes\RunClassInSeparateProcess does not exist.
class NodeScopeResolverTest extends TypeInferenceTestCase
{

Expand Down Expand Up @@ -273,6 +279,8 @@
#[DataProvider('dataFile')]
public function testFile(string $file): void
{
ConstantArrayTypeBuilder::setArrayCountLimit(256);

$asserts = self::gatherAssertTypes($file);
$this->assertNotCount(0, $asserts, sprintf('File %s has no asserts.', $file));
$failures = [];
Expand Down
24 changes: 23 additions & 1 deletion tests/PHPStan/Analyser/data/bug-5081.php

Large diffs are not rendered by default.

11 changes: 11 additions & 0 deletions tests/PHPStan/Rules/Methods/ReturnTypeRuleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
use PHPStan\Rules\Rule;
use PHPStan\Rules\RuleLevelHelper;
use PHPStan\Testing\RuleTestCase;
use PHPStan\Type\Constant\ConstantArrayTypeBuilder;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\Attributes\RequiresPhp;
use PHPUnit\Framework\Attributes\RunInSeparateProcess;
use const PHP_VERSION_ID;

/**
Expand Down Expand Up @@ -855,12 +857,16 @@
$this->analyse([__DIR__ . '/data/bug-8223.php'], $errors);
}

/** @runInSeparateProcess */
#[RunInSeparateProcess]
public function testBug8146bErrors(): void
{
ConstantArrayTypeBuilder::setArrayCountLimit(256);

$this->checkBenevolentUnionTypes = true;
$this->analyse([__DIR__ . '/data/bug-8146b-errors.php'], [
[
"Method Bug8146bError\LocationFixtures::getData() should return array<non-empty-string, array<non-empty-string, array{constituencies: non-empty-list<non-empty-string>, coordinates: array{lat: float, lng: float}}>> but returns array{Bács-Kiskun: array{Ágasegyháza: array{constituencies: array{'Bács-Kiskun 4.', true, false, Bug8146bError\X, null}, coordinates: array{lat: 46.8386043, lng: 19.4502899}}, Akasztó: array{constituencies: array{'Bács-Kiskun 3.'}, coordinates: array{lat: 46.6898175, lng: 19.205086}}, Apostag: array{constituencies: array{'Bács-Kiskun 3.'}, coordinates: array{lat: 46.8812652, lng: 18.9648478}}, Bácsalmás: array{constituencies: array{'Bács-Kiskun 5.'}, coordinates: array{lat: 46.1250396, lng: 19.3357509}}, Bácsbokod: array{constituencies: array{'Bács-Kiskun 6.'}, coordinates: array{lat: 46.1234737, lng: 19.155708}}, Bácsborsód: array{constituencies: array{'Bács-Kiskun 6.'}, coordinates: array{lat: 46.0989373, lng: 19.1566725}}, Bácsszentgyörgy: array{constituencies: array{'Bács-Kiskun 6.'}, coordinates: array{lat: 45.9746039, lng: 19.0398066}}, Bácsszőlős: array{constituencies: array{'Bács-Kiskun 5.'}, coordinates: array{lat: 46.1352003, lng: 19.4215997}}, ...}, Baranya: non-empty-array<literal-string&non-falsy-string, non-empty-array<literal-string&non-falsy-string, non-empty-array<int<0, max>|(literal-string&non-falsy-string), float|(literal-string&non-falsy-string)>>>, Békés: array{Almáskamarás: array{constituencies: array{'Békés 4.'}, coordinates: array{lat: 46.4617785, lng: 21.092448}}, Battonya: array{constituencies: array{'Békés 4.'}, coordinates: array{lat: 46.2902462, lng: 21.0199215}}, Békés: array{constituencies: array{'Békés 2.'}, coordinates: array{lat: 46.6704899, lng: 21.0434996}}, Békéscsaba: array{constituencies: array{'Békés 1.'}, coordinates: array{lat: 46.6735939, lng: 21.0877309}}, Békéssámson: array{constituencies: array{'Békés 4.'}, coordinates: array{lat: 46.4208677, lng: 20.6176498}}, Békésszentandrás: array{constituencies: array{'Békés 2.'}, coordinates: array{lat: 46.8715996, lng: 20.48336}}, Bélmegyer: array{constituencies: array{'Békés 3.'}, coordinates: array{lat: 46.8726019, lng: 21.1832832}}, Biharugra: array{constituencies: array{'Békés 3.'}, coordinates: array{lat: 46.9691009, lng: 21.5987651}}, ...}, Borsod-Abaúj-Zemplén: non-empty-array<literal-string&non-falsy-string, non-empty-array<literal-string&non-falsy-string, non-empty-array<int<0, max>|(literal-string&non-falsy-string), float|(literal-string&non-falsy-string)>>>, Budapest: array{'Budapest I. ker.': array{constituencies: array{'Budapest 01.'}, coordinates: array{lat: 47.4968219, lng: 19.037458}}, 'Budapest II. ker.': array{constituencies: array{'Budapest 03.', 'Budapest 04.'}, coordinates: array{lat: 47.5393329, lng: 18.986934}}, 'Budapest III. ker.': array{constituencies: array{'Budapest 04.', 'Budapest 10.'}, coordinates: array{lat: 47.5671768, lng: 19.0368517}}, 'Budapest IV. ker.': array{constituencies: array{'Budapest 11.', 'Budapest 12.'}, coordinates: array{lat: 47.5648915, lng: 19.0913149}}, 'Budapest V. ker.': array{constituencies: array{'Budapest 01.'}, coordinates: array{lat: 47.5002319, lng: 19.0520181}}, 'Budapest VI. ker.': array{constituencies: array{'Budapest 05.'}, coordinates: array{lat: 47.509863, lng: 19.0625813}}, 'Budapest VII. ker.': array{constituencies: array{'Budapest 05.'}, coordinates: array{lat: 47.5027289, lng: 19.073376}}, 'Budapest VIII. ker.': array{constituencies: array{'Budapest 01.', 'Budapest 06.'}, coordinates: array{lat: 47.4894184, lng: 19.070668}}, ...}, Csongrád-Csanád: array{Algyő: array{constituencies: array{'Csongrád-Csanád 4.'}, coordinates: array{lat: 46.3329625, lng: 20.207889}}, Ambrózfalva: array{constituencies: array{'Csongrád-Csanád 4.'}, coordinates: array{lat: 46.3501417, lng: 20.7313995}}, Apátfalva: array{constituencies: array{'Csongrád-Csanád 4.'}, coordinates: array{lat: 46.173317, lng: 20.5800472}}, Árpádhalom: array{constituencies: array{'Csongrád-Csanád 3.'}, coordinates: array{lat: 46.6158286, lng: 20.547733}}, Ásotthalom: array{constituencies: array{'Csongrád-Csanád 2.'}, coordinates: array{lat: 46.1995983, lng: 19.7833756}}, Baks: array{constituencies: array{'Csongrád-Csanád 3.'}, coordinates: array{lat: 46.5518708, lng: 20.1064166}}, Balástya: array{constituencies: array{'Csongrád-Csanád 3.'}, coordinates: array{lat: 46.4261828, lng: 20.004933}}, Bordány: array{constituencies: array{'Csongrád-Csanád 2.'}, coordinates: array{lat: 46.3194213, lng: 19.9227063}}, ...}, Fejér: array{Aba: array{constituencies: array{'Fejér 5.'}, coordinates: array{lat: 47.0328193, lng: 18.522359}}, Adony: array{constituencies: array{'Fejér 4.'}, coordinates: array{lat: 47.119831, lng: 18.8612469}}, Alap: array{constituencies: array{'Fejér 5.'}, coordinates: array{lat: 46.8075763, lng: 18.684028}}, Alcsútdoboz: array{constituencies: array{'Fejér 3.'}, coordinates: array{lat: 47.4277067, lng: 18.6030325}}, Alsószentiván: array{constituencies: array{'Fejér 5.'}, coordinates: array{lat: 46.7910573, lng: 18.732161}}, Bakonycsernye: array{constituencies: array{'Fejér 2.'}, coordinates: array{lat: 47.321719, lng: 18.0907379}}, Bakonykúti: array{constituencies: array{'Fejér 2.'}, coordinates: array{lat: 47.2458464, lng: 18.195769}}, Balinka: array{constituencies: array{'Fejér 2.'}, coordinates: array{lat: 47.3135736, lng: 18.1907168}}, ...}, Győr-Moson-Sopron: array{Abda: array{constituencies: array{'Győr-Moson-Sopron 5.'}, coordinates: array{lat: 47.6962149, lng: 17.5445786}}, Acsalag: array{constituencies: array{'Győr-Moson-Sopron 3.'}, coordinates: array{lat: 47.676095, lng: 17.1977771}}, Ágfalva: array{constituencies: array{'Győr-Moson-Sopron 4.'}, coordinates: array{lat: 47.688862, lng: 16.5110233}}, Agyagosszergény: array{constituencies: array{'Győr-Moson-Sopron 3.'}, coordinates: array{lat: 47.608545, lng: 16.9409912}}, Árpás: array{constituencies: array{'Győr-Moson-Sopron 3.'}, coordinates: array{lat: 47.5134127, lng: 17.3931579}}, Ásványráró: array{constituencies: array{'Győr-Moson-Sopron 5.'}, coordinates: array{lat: 47.8287695, lng: 17.499195}}, Babót: array{constituencies: array{'Győr-Moson-Sopron 3.'}, coordinates: array{lat: 47.5752269, lng: 17.0758604}}, Bágyogszovát: array{constituencies: array{'Győr-Moson-Sopron 3.'}, coordinates: array{lat: 47.5866036, lng: 17.3617273}}, ...}, ...}.",

Check failure on line 869 in tests/PHPStan/Rules/Methods/ReturnTypeRuleTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, ubuntu-latest)

Attribute class PHPUnit\Framework\Attributes\RunInSeparateProcess does not exist.

Check failure on line 869 in tests/PHPStan/Rules/Methods/ReturnTypeRuleTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, ubuntu-latest)

Attribute class PHPUnit\Framework\Attributes\RunInSeparateProcess does not exist.

Check failure on line 869 in tests/PHPStan/Rules/Methods/ReturnTypeRuleTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.1, windows-latest)

Attribute class PHPUnit\Framework\Attributes\RunInSeparateProcess does not exist.

Check failure on line 869 in tests/PHPStan/Rules/Methods/ReturnTypeRuleTest.php

View workflow job for this annotation

GitHub Actions / PHPStan (8.0, windows-latest)

Attribute class PHPUnit\Framework\Attributes\RunInSeparateProcess does not exist.
12,
"Offset 'constituencies' (non-empty-list<non-empty-string>) does not accept type array{'Bács-Kiskun 4.', true, false, Bug8146bError\X, null}.",
],
Expand Down Expand Up @@ -1291,4 +1297,9 @@
$this->analyse([__DIR__ . '/data/bug-10771.php'], []);
}

public function testBug8636(): void
{
$this->analyse([__DIR__ . '/data/bug-8636.php'], []);
}

}
Loading
Loading