Configure Psalm to ignore MissingFile in ApplicationProvider

The error was intriduced by Psalm 4.21 as it now resolves __DIR__.
It's recommended [1] to ignore the error if it happens despite an
existence check for the file.

[1] https://github.com/vimeo/psalm/issues/3886#issuecomment-663585426
This commit is contained in:
Martin Zurowietz 2022-02-21 10:39:47 +01:00
parent f6193ad5cb
commit 48c1425c86

View File

@ -52,6 +52,7 @@ final class ApplicationProvider
}
if (file_exists($applicationPath = __DIR__ . '/../../../../bootstrap/app.php')) { // Applications
/** @psalm-suppress MissingFile file is checked for existence */
$app = require $applicationPath;
} elseif (file_exists($applicationPath = getcwd() . '/bootstrap/app.php')) { // Local Dev
$app = require $applicationPath;