diff --git a/lib/Doctrine/Deprecations/Deprecation.php b/lib/Doctrine/Deprecations/Deprecation.php index 6c76d98..dc29820 100644 --- a/lib/Doctrine/Deprecations/Deprecation.php +++ b/lib/Doctrine/Deprecations/Deprecation.php @@ -46,7 +46,7 @@ class Deprecation private const TYPE_TRIGGER_ERROR = 2; private const TYPE_PSR_LOGGER = 4; - /** @var self::TYPE_*|null */ + /** @var int-mask-of|null */ private static $type; /** @var LoggerInterface|null */ @@ -271,7 +271,7 @@ public static function getTriggeredDeprecations(): array } /** - * @return self::TYPE_* + * @return int-mask-of */ private static function getTypeFromEnv(): int { diff --git a/phpstan.neon b/phpstan.neon index 526e3bb..3562669 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,5 @@ parameters: - level: 3 + level: 6 paths: - lib - tests diff --git a/psalm.xml b/psalm.xml index a41a366..0d1301f 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,6 +1,6 @@ assertStringMatchesFormat( $expectedMessage, $message ); $this->assertEquals([$identifier => $times], Deprecation::getTriggeredDeprecations()); + + return false; }); } @@ -152,7 +153,7 @@ public function testDeprecationResetsCounts(): void } } - public function expectDeprecationMock(string $message, string $identifier, string $package): MockObject + public function expectDeprecationMock(string $message, string $identifier, string $package): LoggerInterface { $mock = $this->createMock(LoggerInterface::class); $mock->method('notice')->with($message, $this->callback(function ($context) use ($identifier, $package) { diff --git a/tests/Doctrine/Deprecations/VerifyDeprecationsTest.php b/tests/Doctrine/Deprecations/VerifyDeprecationsTest.php index 8681f7d..1d4f6de 100644 --- a/tests/Doctrine/Deprecations/VerifyDeprecationsTest.php +++ b/tests/Doctrine/Deprecations/VerifyDeprecationsTest.php @@ -15,7 +15,8 @@ class VerifyDeprecationsTest extends TestCase public function setUp(): void { - set_error_handler(static function (): void { + set_error_handler(static function (): bool { + return false; }); }