Multiline PHPDoc types? #9969
Closed
ondrejmirtes
started this conversation in
General
Replies: 1 comment 1 reply
-
In general? We try to support them, but it's not always possible as the PHPDoc tag syntax is ambiguous, and even where it is possible, the support is spotty at best. So I've been recommending users parenthesize types to avoid the ambiguity. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
how does Psalm go about multiline PHPDoc types?
In Doctrine there's: https://github.com/doctrine/orm/blob/4c3bd208018c26498e5f682aaad45fa00ea307d5/lib/Doctrine/ORM/Query/Parser.php#L2569-L2577
And it seems like Psalm is handling it fine, but I'm struggling to do the same thing in the playground: https://psalm.dev/r/de76ee99bc
PHPStan supports newlines in these places:
Foo<Bar, Baz>
in few specific placesBecause of phpdoc-parser issues like this slevomat/coding-standard#1586 I want to expand the multiline support, but I need to know exactly how other people do it :)
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions