diff --git a/src/Type/Symfony/Helper.php b/src/Type/Symfony/Helper.php index a39af310..099b64c2 100644 --- a/src/Type/Symfony/Helper.php +++ b/src/Type/Symfony/Helper.php @@ -17,7 +17,7 @@ public static function createMarkerNode(Expr $expr, Type $type, PrettyPrinterAbs return new Expr\Variable(md5(sprintf( '%s::%s', $printer->prettyPrintExpr($expr), - $type->describe(VerbosityLevel::value()) + $type->describe(VerbosityLevel::precise()) ))); } diff --git a/tests/Type/Symfony/ImpossibleCheckTypeMethodCallRuleTest.php b/tests/Type/Symfony/ImpossibleCheckTypeMethodCallRuleTest.php index dba9cbfa..ab247b9f 100644 --- a/tests/Type/Symfony/ImpossibleCheckTypeMethodCallRuleTest.php +++ b/tests/Type/Symfony/ImpossibleCheckTypeMethodCallRuleTest.php @@ -21,6 +21,11 @@ public function testExtension(): void $this->analyse([__DIR__ . '/data/request_get_session.php'], []); } + public function testBug178(): void + { + $this->analyse([__DIR__ . '/data/bug-178.php'], []); + } + public static function getAdditionalConfigFiles(): array { return [ diff --git a/tests/Type/Symfony/data/bug-178.php b/tests/Type/Symfony/data/bug-178.php new file mode 100644 index 00000000..9dbd5137 --- /dev/null +++ b/tests/Type/Symfony/data/bug-178.php @@ -0,0 +1,17 @@ +has('sonata.media.manager.category') && $this->has('sonata.media.manager.context')) { + // do stuff that requires both managers. + } + } + +}