1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 21:31:13 +01:00

Use more robust check for Stringable stub

This commit is contained in:
Matt Brown 2020-10-29 14:15:35 -04:00
parent 5c784dc7cb
commit 2e95d1fb98

View File

@ -1741,7 +1741,7 @@ class Config
$core_generic_files[] = $ext_ds_path;
}
if (!\interface_exists('Stringable', false) && $codebase->php_major_version >= 8) {
if (\version_compare(\PHP_VERSION, '8.0', '<') && $codebase->php_major_version >= 8) {
$stringable_path = dirname(__DIR__, 2) . '/stubs/Stringable.php';
if (!file_exists($stringable_path)) {