Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Organize extension requirements in composer.json #7648

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions bin/composer-require-checker-config.json
Expand Up @@ -18,8 +18,7 @@
"pcntl",
"posix",
"filter",
"curl",
"PDO"
"curl"
],
"scan-files" : []
}
5 changes: 4 additions & 1 deletion composer.json
Expand Up @@ -18,6 +18,7 @@
"ext-SimpleXML": "*",
"ext-ctype": "*",
"ext-dom": "*",
"ext-filter": "*",
"ext-json": "*",
"ext-libxml": "*",
"ext-mbstring": "*",
Expand Down Expand Up @@ -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": {
Expand Down
Expand Up @@ -3,7 +3,6 @@
namespace Psalm\Internal\Analyzer\Statements\Expression\Call\Method;

use Exception;
use PDOException;
use PhpParser;
use Psalm\CodeLocation;
use Psalm\Codebase;
Expand Down Expand Up @@ -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
Expand Down