Skip to content

Commit

Permalink
Forward compatibility with future PHPStan version
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Apr 2, 2021
1 parent 37c4d36 commit 4f94ccd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Type/Symfony/Config/ValueObject/ParentObjectType.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use PHPStan\Type\ObjectType;
use PHPStan\Type\Type;
use PHPStan\Type\VerbosityLevel;

class ParentObjectType extends ObjectType
{
Expand All @@ -23,4 +24,9 @@ public function getParent(): Type
return $this->parent;
}

protected function describeAdditionalCacheKey(): string
{
return $this->parent->describe(VerbosityLevel::cache());
}

}
5 changes: 5 additions & 0 deletions src/Type/Symfony/Config/ValueObject/TreeBuilderType.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ public function getRootNodeClassName(): string
return $this->rootNodeClassName;
}

protected function describeAdditionalCacheKey(): string
{
return $this->getRootNodeClassName();
}

}

0 comments on commit 4f94ccd

Please sign in to comment.