Skip to content

Commit

Permalink
Psalm 5.21.1 (doctrine#6294)
Browse files Browse the repository at this point in the history
  • Loading branch information
derrabus authored Feb 4, 2024
1 parent ac75c3c commit d928827
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"squizlabs/php_codesniffer": "3.8.1",
"symfony/cache": "^6.3.8|^7.0",
"symfony/console": "^5.4|^6.3|^7.0",
"vimeo/psalm": "5.16.0"
"vimeo/psalm": "5.21.1"
},
"suggest": {
"symfony/console": "For helpful console commands such as SQL execution and import of files."
Expand Down
4 changes: 3 additions & 1 deletion src/Driver/OCI8/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ public function connect(

$connectionString = $this->getEasyConnectString($params);

/** @psalm-suppress RiskyTruthyFalsyComparison */
$persistent = ! empty($params['persistent']);
$exclusive = ! empty($params['driverOptions']['exclusive']);
/** @psalm-suppress RiskyTruthyFalsyComparison */
$exclusive = ! empty($params['driverOptions']['exclusive']);

if ($persistent && $exclusive) {
throw InvalidConfiguration::forPersistentAndExclusive();
Expand Down
1 change: 1 addition & 0 deletions src/Platforms/SQLitePlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,7 @@ private function getSimpleAlterTableSQL(TableDiff $diff): array|false

$type = $definition['type'];

/** @psalm-suppress RiskyTruthyFalsyComparison */
switch (true) {
case isset($definition['columnDefinition']) || $definition['autoincrement'] || $definition['unique']:
case $type instanceof Types\DateTimeType && $definition['default'] === $this->getCurrentTimestampSQL():
Expand Down
1 change: 1 addition & 0 deletions tests/Functional/Driver/OCI8/ResultTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public function testTruncatedFetch(
// after the initial prefetch that caches locally the first X results
$this->createOrReplacePipelinedFunction($expectedTotalRowCount + 10);

/** @var callable|null $previous */
$previous = null;
$previous = set_error_handler(static function (int $errno, string $errstr) use (&$previous): bool {
if (str_contains($errstr, 'ORA-04061')) {
Expand Down
1 change: 1 addition & 0 deletions tests/Functional/ExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public function testInvalidFieldNameException(): void
$this->expectException(Exception\InvalidFieldNameException::class);

// prevent the PHPUnit error handler from handling the warning that db2_bind_param() may trigger
/** @var callable|null $previous */
$previous = null;
$previous = set_error_handler(static function (int $errno) use (&$previous): bool {
if (($errno & ~E_WARNING) === 0) {
Expand Down
1 change: 1 addition & 0 deletions tests/Functional/TransactionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ private function expectConnectionLoss(callable $scenario): void
$this->expectException(ConnectionLost::class);

// prevent the PHPUnit error handler from handling the "MySQL server has gone away" warning
/** @var callable|null $previous */
$previous = null;
$previous = set_error_handler(static function (int $errno) use (&$previous): bool {
if (($errno & ~E_WARNING) === 0) {
Expand Down

0 comments on commit d928827

Please sign in to comment.