diff --git a/bin/composer-require-checker-config.json b/bin/composer-require-checker-config.json index 753f91dd159..f5086b03461 100644 --- a/bin/composer-require-checker-config.json +++ b/bin/composer-require-checker-config.json @@ -18,8 +18,7 @@ "pcntl", "posix", "filter", - "curl", - "PDO" + "curl" ], "scan-files" : [] } diff --git a/composer.json b/composer.json index 107ccf801b8..0c8d5a921d1 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,7 @@ "ext-SimpleXML": "*", "ext-ctype": "*", "ext-dom": "*", + "ext-filter": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", @@ -57,7 +58,9 @@ }, "suggest": { "ext-igbinary": "^2.0.5 is required, used to serialize caching data", - "ext-curl": "In order to send data to shepherd" + "ext-curl": "In order to send data to shepherd", + "ext-pcntl": "In order to run psalm-language-server", + "ext-posix": "In order to run psalm-language-server" }, "config": { "allow-plugins": { diff --git a/src/Psalm/Internal/Analyzer/Statements/Expression/Call/Method/MethodCallReturnTypeFetcher.php b/src/Psalm/Internal/Analyzer/Statements/Expression/Call/Method/MethodCallReturnTypeFetcher.php index 2da1db04209..badb954fa74 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Expression/Call/Method/MethodCallReturnTypeFetcher.php +++ b/src/Psalm/Internal/Analyzer/Statements/Expression/Call/Method/MethodCallReturnTypeFetcher.php @@ -3,7 +3,6 @@ namespace Psalm\Internal\Analyzer\Statements\Expression\Call\Method; use Exception; -use PDOException; use PhpParser; use Psalm\CodeLocation; use Psalm\Codebase; @@ -105,7 +104,7 @@ public static function fetch( || $codebase->interfaceExtends($premixin_method_id->fq_class_name, Throwable::class) ) ) { - if ($premixin_method_id->fq_class_name === PDOException::class) { + if ($premixin_method_id->fq_class_name === 'PDOException') { return Type::getString(); } else { return Type::getInt(true); // TODO: Remove the flag in Psalm 5