You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Wrapping the code inside a try-catch seems to fix the issue, but is this a correct way to fix this issue and is an empty array a good fallback for $input_type_params?
Wrapping the code inside a try-catch seems to fix the issue, but is this a correct way to fix this issue and is an empty array a good fallback for $input_type_params?
I would probably do if ($codebase->classlike_storage_provider->has(...)) instead of try-catch, but empty array should be fine for a fallback. Feel free to provide a PR, otherwise I'll get around to it probably early next week.
psalm/src/Psalm/Internal/Type/TemplateStandinTypeReplacer.php
Line 1142 in 1ef3851
Might fail if the referenced class-like
$input_type_part->value
does not exists.introduced in af5c191
This can happen when a library has a
@psalm-assert
using a class/interface that it and the main application does not explicitly require.An example is when using amphp/amp function
all
https://github.com/amphp/amp/blob/9d5100cebffa729aaffecd3ad25dc5aeea4f13bb/lib/functions.php#L384 which usesReact\Promise\PromiseInterface
in@psalm-assert
butReact
is not hard requirement forAmp
nor our application.Wrapping the code inside a try-catch seems to fix the issue, but is this a correct way to fix this issue and is an empty array a good fallback for
$input_type_params
?The text was updated successfully, but these errors were encountered: