ERROR: MixedAssignment - <redacted>/Directory.php:38:28 - Unable to determine the type that $file is being assigned to (see https://psalm.dev/032)
foreach ($files as $file) {
ERROR: MixedArgument - <redacted>/Directory.php:39:32 - Argument 1 of <redacted>\Directory::filter cannot be mixed, expecting Symfony\Component\Finder\SplFileInfo (see https://psalm.dev/030)
if (!$this->filter($file)) {
The type of $file is sourced from here - <redacted>/Directory.php:38:28
foreach ($files as $file) {
It's a bit tricky to reproduce on psalm.dev because it requires a lot of types/code to be defined, but I may try do that if it's still not enough details here.
This code was working fine for years until 4.24.0 was released
It now returns the following warning:
Trace returns type as expected:
It's a bit tricky to reproduce on psalm.dev because it requires a lot of types/code to be defined, but I may try do that if it's still not enough details here.