Skip to content

Commit

Permalink
Merge branch '3.1.x' into 3.2.x
Browse files Browse the repository at this point in the history
* 3.1.x:
  PHPStan 1.2.0, Psalm 4.13.0
  Fix getServerVersion for OCI8 when assertions are disabled
  • Loading branch information
derrabus committed Nov 21, 2021
2 parents 635376e + 6577fea commit 263ddfa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
"require-dev": {
"doctrine/coding-standard": "9.0.0",
"jetbrains/phpstorm-stubs": "2021.1",
"phpstan/phpstan": "1.1.1",
"phpstan/phpstan-strict-rules": "^1",
"phpstan/phpstan": "1.2.0",
"phpstan/phpstan-strict-rules": "^1.1",
"phpunit/phpunit": "9.5.10",
"psalm/plugin-phpunit": "0.16.1",
"squizlabs/php_codesniffer": "3.6.1",
"symfony/cache": "^5.2|^6.0",
"symfony/console": "^2.0.5|^3.0|^4.0|^5.0|^6.0",
"vimeo/psalm": "4.12.0"
"vimeo/psalm": "4.13.0"
},
"suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files."
Expand Down
12 changes: 0 additions & 12 deletions psalm.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -384,18 +384,6 @@
<file name="tests/Platforms/AbstractMySQLPlatformTestCase.php"/>
</errorLevel>
</TooManyArguments>
<TypeDoesNotContainType>
<errorLevel type="suppress">
<!-- See https://github.com/vimeo/psalm/issues/4274 -->
<file name="src/Schema/Index.php"/>
</errorLevel>
</TypeDoesNotContainType>
<UndefinedAttributeClass>
<errorLevel type="suppress">
<!-- This class has been added in PHP 8.1 -->
<referencedClass name="ReturnTypeWillChange"/>
</errorLevel>
</UndefinedAttributeClass>
<UndefinedConstant>
<errorLevel type="suppress">
<!--
Expand Down
3 changes: 2 additions & 1 deletion src/Driver/OCI8/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public function getServerVersion(): string
throw Error::new($this->connection);
}

assert(preg_match('/\s+(\d+\.\d+\.\d+\.\d+\.\d+)\s+/', $version, $matches) === 1);
$result = preg_match('/\s+(\d+\.\d+\.\d+\.\d+\.\d+)\s+/', $version, $matches);
assert($result === 1);

return $matches[1];
}
Expand Down

0 comments on commit 263ddfa

Please sign in to comment.