diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 22f047a7..65e4c6c5 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -55,20 +55,12 @@ 'return_assignment' => false, 'comment_to_phpdoc' => false, 'general_phpdoc_annotation_remove' => [ - 'annotations' => ['author', 'copyright', 'throws'], + 'annotations' => ['author', 'copyright'], ], // fn => without curly brackets is less readable, // also prevent bounding of unwanted variables for GC 'use_arrow_functions' => false, - - // TODO disable too strict rules for now - 'declare_strict_types' => false, - 'general_phpdoc_annotation_remove' => false, - 'php_unit_data_provider_static' => false, - 'php_unit_strict' => false, - 'phpdoc_to_comment' => false, - 'strict_comparison' => false, ]) ->setFinder($finder) ->setCacheFile(sys_get_temp_dir() . '/php-cs-fixer.' . md5(__DIR__) . '.cache'); diff --git a/tests/mutex/CASMutexTest.php b/tests/mutex/CASMutexTest.php index 969ae30e..6c278d37 100644 --- a/tests/mutex/CASMutexTest.php +++ b/tests/mutex/CASMutexTest.php @@ -1,5 +1,7 @@ query('SELECT count(*) FROM testExceptionRollsback')->fetchColumn(); - self::assertEquals(0, $count); + self::assertSame(0, \PHP_VERSION_ID < 8_10_00 ? (int) $count : $count); } /** @@ -123,7 +125,7 @@ public function testReplayTransaction(\Exception $exception): void ++$i; $count = $pdo->query('SELECT count(*) FROM testExceptionRollsback')->fetchColumn(); - self::assertEquals(0, $count); + self::assertSame(0, \PHP_VERSION_ID < 8_10_00 ? (int) $count : $count); $pdo->exec('INSERT INTO testExceptionRollsback VALUES(1)'); @@ -134,7 +136,7 @@ public function testReplayTransaction(\Exception $exception): void }); $count = $pdo->query('SELECT count(*) FROM testExceptionRollsback')->fetchColumn(); - self::assertEquals(1, $count); + self::assertSame(1, \PHP_VERSION_ID < 8_10_00 ? (int) $count : $count); self::assertSame(5, $i); } diff --git a/tests/util/DoubleCheckedLockingTest.php b/tests/util/DoubleCheckedLockingTest.php index 3a9f6665..1386ef21 100644 --- a/tests/util/DoubleCheckedLockingTest.php +++ b/tests/util/DoubleCheckedLockingTest.php @@ -1,5 +1,7 @@