diff --git a/composer.json b/composer.json index fd16c2f78cf..ac7db5e7d42 100644 --- a/composer.json +++ b/composer.json @@ -42,14 +42,14 @@ "require-dev": { "doctrine/coding-standard": "10.0.0", "jetbrains/phpstorm-stubs": "2022.2", - "phpstan/phpstan": "1.8.2", + "phpstan/phpstan": "1.8.3", "phpstan/phpstan-strict-rules": "^1.3", "phpunit/phpunit": "9.5.24", "psalm/plugin-phpunit": "0.17.0", "squizlabs/php_codesniffer": "3.7.1", "symfony/cache": "^5.4|^6.0", "symfony/console": "^4.4|^5.4|^6.0", - "vimeo/psalm": "4.26.0" + "vimeo/psalm": "4.27.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." diff --git a/phpstan.neon.dist b/phpstan.neon.dist index b416e20db0a..ad09ce5efa5 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -27,7 +27,6 @@ parameters: - message: '~^Only booleans are allowed in .*, mixed given~' paths: - - src/Driver/*/Driver.php - src/Platforms/*Platform.php - src/Query/QueryBuilder.php - src/Schema/*SchemaManager.php @@ -101,11 +100,6 @@ parameters: - src/Driver/Mysqli/Exception/InvalidCharset.php - src/Driver/Mysqli/Exception/StatementError.php - - - message: '~^Unable to resolve the template type T in call to method Doctrine\\DBAL\\Portability\\Converter\:\:compose\(\)$~' - paths: - - src/Portability/Converter.php - # Type check for legacy implementations of the Connection interface # TODO: remove in 4.0.0 - "~Call to function method_exists\\(\\) with Doctrine\\\\DBAL\\\\Driver\\\\Connection and 'getNativeConnection' will always evaluate to true\\.~" diff --git a/tests/Functional/Platform/DateExpressionTest.php b/tests/Functional/Platform/DateExpressionTest.php index 972d2f716aa..05c812fdfac 100644 --- a/tests/Functional/Platform/DateExpressionTest.php +++ b/tests/Functional/Platform/DateExpressionTest.php @@ -2,7 +2,6 @@ namespace Doctrine\DBAL\Tests\Functional\Platform; -use DateTimeImmutable; use Doctrine\DBAL\Schema\Table; use Doctrine\DBAL\Tests\FunctionalTestCase; @@ -30,21 +29,10 @@ public function testDifference(string $date1, string $date2, int $expected): voi self::assertEquals($expected, $diff); } - /** @return string[][]|int[][] */ + /** @return array */ public static function differenceProvider(): iterable { - $date1 = new DateTimeImmutable(); - $date2 = new DateTimeImmutable('2018-04-10 10:10:10'); - $expected = $date1->modify('midnight')->diff( - $date2->modify('midnight'), - )->days; - return [ - 'dynamic' => [ - $date1->format('Y-m-d H:i:s'), - $date2->format('Y-m-d H:i:s'), - $expected, - ], 'same day' => ['2018-04-14 23:59:59', '2018-04-14 00:00:00', 0], 'midnight' => ['2018-04-14 00:00:00', '2018-04-13 23:59:59', 1], ];