Closed vlakarados closed 1 year ago
Despite this is actually a problem, the main issue is with a recent commit to psalm: https://github.com/vimeo/psalm/issues/10132
AllowDirectivesConfig
is a global type alias defined here https://github.com/spaze/phpstan-disallowed-calls/blob/c7a80cc9747e6307bfa6f5ea88ed3f9b1804790c/phpstan.neon#L12
I see, actually never used that, but this can be achieved with https://psalm.dev/docs/annotating_code/supported_annotations/#psalm-type and @psalm-import-type
which phpstan seems to also understand.
In any case, this is a question of preference, and I think this issue can be closed
Thanks, I don't know if Psalm supports aliases in @phpstan-param
, guess they don't and guess they should 😅
Alright, closing.
Bug Description Running psalm on a codebase with recent version of phpstan-disallowed-calls (which is included in vendor due to running in development) ends up with psalm dying:
Additional context
Seems to be related to line 179 in
\vendor\spaze\phpstan-disallowed-calls\src\Allowed\Allowed.php
:* @phpstan-param AllowDirectivesConfig $allowed
where indeedAllowDirectivesConfig
is undefined and not found across the project.https://github.com/spaze/phpstan-disallowed-calls/blob/main/src/Allowed/Allowed.php#L179