Skip to content

Commit d35f516

Browse files
bug #60820 [TypeInfo] Fix handling ConstFetchNode (norkunas)
This PR was squashed before being merged into the 7.2 branch. Discussion ---------- [TypeInfo] Fix handling `ConstFetchNode` | Q | A | ------------- | --- | Branch? | 7.2 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #... | License | MIT I cannot upgrade to 7.3 because I get: ``` In StringTypeResolver.php line 88: !! !! Cannot resolve "array{requirement: ProductLicense::SYSTEM_REQUIREMENT_*, va !! lue: non-empty-string}". !! !! !! In StringTypeResolver.php line 142: !! !! Unhandled "PHPStan\PhpDocParser\Ast\ConstExpr\ConstFetchNode" constant expr !! ession. !! ``` Commits ------- 03cc6071c59 [TypeInfo] Fix handling `ConstFetchNode`
2 parents 8d5af62 + 0aa40bf commit d35f516

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Tests/Normalizer/ObjectNormalizerTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ public function testDoesntHaveIssuesWithUnionConstTypes()
748748
$serializer = new Serializer([new ArrayDenormalizer(), new DateTimeNormalizer(), $normalizer]);
749749

750750
$this->assertSame('bar', $serializer->denormalize(['foo' => 'bar'], (new class {
751+
public const TEST = 'me';
752+
751753
/** @var self::*|null */
752754
public $foo;
753755
})::class)->foo);

0 commit comments

Comments
 (0)