Skip to content

Commit 4f94ccd

Browse files
committed
Forward compatibility with future PHPStan version
1 parent 37c4d36 commit 4f94ccd

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/Type/Symfony/Config/ValueObject/ParentObjectType.php

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use PHPStan\Type\ObjectType;
66
use PHPStan\Type\Type;
7+
use PHPStan\Type\VerbosityLevel;
78

89
class ParentObjectType extends ObjectType
910
{
@@ -23,4 +24,9 @@ public function getParent(): Type
2324
return $this->parent;
2425
}
2526

27+
protected function describeAdditionalCacheKey(): string
28+
{
29+
return $this->parent->describe(VerbosityLevel::cache());
30+
}
31+
2632
}

src/Type/Symfony/Config/ValueObject/TreeBuilderType.php

+5
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,9 @@ public function getRootNodeClassName(): string
2222
return $this->rootNodeClassName;
2323
}
2424

25+
protected function describeAdditionalCacheKey(): string
26+
{
27+
return $this->getRootNodeClassName();
28+
}
29+
2530
}

0 commit comments

Comments
 (0)