Skip to content

Commit

Permalink
Merge pull request #5178 from derrabus/bump/phpstan
Browse files Browse the repository at this point in the history
PHPStan 1.4.0
  • Loading branch information
derrabus authored Jan 17, 2022
2 parents 4832932 + eec03b1 commit 71f8ed2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
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",
"phpstan/phpstan": "1.3.0",
"phpstan/phpstan": "1.4.0",
"phpunit/phpunit": "^7.5.20|^8.5|9.5.11",
"psalm/plugin-phpunit": "0.16.1",
"squizlabs/php_codesniffer": "3.6.2",
Expand Down
2 changes: 1 addition & 1 deletion lib/Doctrine/DBAL/Types/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ public function getBindingType()
* Gets the types array map which holds all registered types and the corresponding
* type class
*
* @return string[]
* @return array<string, string>
*/
public static function getTypesMap()
{
Expand Down
18 changes: 12 additions & 6 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,6 @@ parameters:
paths:
- lib/Doctrine/DBAL/Portability/Connection.php

# Unlike Psalm, PHPStan doesn't understand the shape of the parse_str() return value
-
message: '~^Parameter #1 \$scheme of static method Doctrine\\DBAL\\DriverManager::parseDatabaseUrlScheme\(\) expects string\|null, int\|string\|null given\.$~'
paths:
- lib/Doctrine/DBAL/DriverManager.php

# Until 3.x, $_conn does accept PDO
-
message: '~^Property Doctrine\\DBAL\\Connection::\$_conn \(Doctrine\\DBAL\\Driver\\Connection\|null\) does not accept PDO\.$~'
Expand Down Expand Up @@ -115,7 +109,19 @@ parameters:
paths:
- lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php

# This is a new requirement for PHP7's oci8 extension that prevents bound values from being garbage collected.
-
message: '~^Property Doctrine\\DBAL\\Driver\\OCI8\\OCI8Statement\:\:\$boundValues is never read, only written\.$~'
paths:
- lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php

-
message: '~Method Doctrine\\DBAL\\Driver\\Mysqli\\MysqliStatement::rowCount\(\) should return int but returns int\|string\.~'
paths:
- lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php

# TODO: This class is deprecaed, remove this rule on 3.x
-
message: '~^Parameter #2 \$code of class RuntimeException constructor expects int, string given\.$~'
paths:
- lib/Doctrine/DBAL/Tools/Console/Command/ImportCommand.php

0 comments on commit 71f8ed2

Please sign in to comment.