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

Update JetBrains PhpStorm stubs to 2022.1 #5356

Merged
merged 1 commit into from
Apr 15, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"require-dev": {
"doctrine/coding-standard": "9.0.0",
"jetbrains/phpstorm-stubs": "2021.1",
"jetbrains/phpstorm-stubs": "2022.1",
"phpstan/phpstan": "1.5.3",
"phpstan/phpstan-strict-rules": "^1.1",
"phpunit/phpunit": "9.5.16",
Expand Down
6 changes: 6 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ parameters:
paths:
- src/Driver/OCI8/Statement.php

# https://github.com/phpstan/phpstan-src/pull/1214
-
message: '~^Expression on left side of \?\? is not nullable\.$~'
paths:
- src/Driver/IBMDB2/Connection.php

# TODO: check for null after calling Connection::getDatabase()
-
message: '~Parameter.*\$database of method.*expects string, string\|null given\.~'
Expand Down
18 changes: 5 additions & 13 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,6 @@
</DeprecatedProperty>
<DocblockTypeContradiction>
<errorLevel type="suppress">
<!--
Requires a release of https://github.com/JetBrains/phpstorm-stubs/pull/766
-->
<file name="src/Driver/Mysqli/Result.php"/>
<!--
These issues can be mostly divided in the following categories:
1. Union types not supported at the language level (require dropping PHP 7 support)
Expand Down Expand Up @@ -439,19 +435,15 @@
<file name="tests/Platforms/AbstractMySQLPlatformTestCase.php"/>
</errorLevel>
</TooManyArguments>
<UndefinedConstant>
<errorLevel type="suppress">
<!--
Requires a release of
https://github.com/JetBrains/phpstorm-stubs/pull/732
-->
<file name="tests/Driver/PDO/PgSQL/DriverTest.php" />
</errorLevel>
</UndefinedConstant>
<UndefinedDocblockClass>
<errorLevel type="suppress">
<!-- See https://github.com/vimeo/psalm/issues/5472 -->
<referencedClass name="Doctrine\DBAL\Portability\T"/>
<!--
The OCI-Lob class was renamed to OCILob in PHP 8 while Psalm infers PHP 7.3 from composer.json
and may not properly interpret the LanguageLevelTypeAware annotation from the stubs.
-->
<referencedClass name="OCILob"/>
</errorLevel>
</UndefinedDocblockClass>
<InvalidReturnStatement>
Expand Down
2 changes: 1 addition & 1 deletion src/Driver/IBMDB2/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public function lastInsertId($name = null)
);
}

return db2_last_insert_id($this->connection);
return db2_last_insert_id($this->connection) ?? false;
}

public function beginTransaction(): bool
Expand Down