diff --git a/core/modules/taxonomy/src/TermStorage.php b/core/modules/taxonomy/src/TermStorage.php index 061abd39e4abc0800cdf7a9b17f1cc09fddf9135..e121a1744a3ab0ea723d61fe85b469cb589e0dca 100644 --- a/core/modules/taxonomy/src/TermStorage.php +++ b/core/modules/taxonomy/src/TermStorage.php @@ -449,6 +449,7 @@ public function getVocabularyHierarchyType($vid) { * {@inheritdoc} */ public function __sleep() { + /** @var string[] $vars */ $vars = parent::__sleep(); // Do not serialize static cache. unset($vars['ancestors'], $vars['treeChildren'], $vars['treeParents'], $vars['treeTerms'], $vars['trees'], $vars['vocabularyHierarchyType']); diff --git a/core/phpstan-baseline.neon b/core/phpstan-baseline.neon index e1e023376cc73249f08f388cfb8d00b701d99674..6ad81f0594f512f1e8bfd75ba4eeff5af453c67a 100644 --- a/core/phpstan-baseline.neon +++ b/core/phpstan-baseline.neon @@ -2030,36 +2030,6 @@ parameters: count: 1 path: modules/taxonomy/src/TermForm.php - - - message: "#^Cannot unset offset 'ancestors' on array\\<int, string\\>\\.$#" - count: 1 - path: modules/taxonomy/src/TermStorage.php - - - - message: "#^Cannot unset offset 'treeChildren' on array\\<int, string\\>\\.$#" - count: 1 - path: modules/taxonomy/src/TermStorage.php - - - - message: "#^Cannot unset offset 'treeParents' on array\\<int, string\\>\\.$#" - count: 1 - path: modules/taxonomy/src/TermStorage.php - - - - message: "#^Cannot unset offset 'treeTerms' on array\\<int, string\\>\\.$#" - count: 1 - path: modules/taxonomy/src/TermStorage.php - - - - message: "#^Cannot unset offset 'trees' on array\\<int, string\\>\\.$#" - count: 1 - path: modules/taxonomy/src/TermStorage.php - - - - message: "#^Cannot unset offset 'vocabularyHierarchy…' on array\\<int, string\\>\\.$#" - count: 1 - path: modules/taxonomy/src/TermStorage.php - - message: "#^Method Drupal\\\\taxonomy\\\\VocabularyForm\\:\\:save\\(\\) should return int but return statement is missing\\.$#" count: 1