From 4f2a9fd604ec12932387d62be20b4fabe4090d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Nowak?= Date: Tue, 22 Sep 2026 14:43:43 +0200 Subject: [PATCH 1/2] IBX-12654: Added ibexa/phpstan to the PHPStan configuration --- composer.json | 1 + phpstan.neon | 1 + 2 files changed, 2 insertions(+) diff --git a/composer.json b/composer.json index 555f542..2481e42 100644 --- a/composer.json +++ b/composer.json @@ -22,6 +22,7 @@ "require-dev": { "ibexa/code-style": "~2.0.0", "ibexa/doctrine-schema": "~6.0.x-dev", + "ibexa/phpstan": "~6.0.x-dev", "ibexa/rector": "~6.0.x-dev", "phpstan/phpstan": "^2.0", "phpstan/phpstan-phpunit": "^2.0", diff --git a/phpstan.neon b/phpstan.neon index e85bd74..86385e8 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,6 +1,7 @@ includes: - vendor/phpstan/phpstan-phpunit/extension.neon - vendor/phpstan/phpstan-symfony/extension.neon + - vendor/ibexa/phpstan/extension.neon - phpstan-baseline.neon parameters: From 991e6216f5ebe640ead71c58cd2e733a8239f5ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Nowak?= Date: Tue, 22 Sep 2026 14:45:14 +0200 Subject: [PATCH 2/2] IBX-12654: Fixed dynamic calls to static methods --- tests/lib/Channel/SystemNotificationChannelTest.php | 6 +++--- tests/lib/Mapper/NotificationMapperTest.php | 4 ++-- tests/lib/Mapper/RecipientMapperTest.php | 4 ++-- .../SubscriptionResolver/ChainSubscriptionResolverTest.php | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/lib/Channel/SystemNotificationChannelTest.php b/tests/lib/Channel/SystemNotificationChannelTest.php index 63028ec..130bfc5 100644 --- a/tests/lib/Channel/SystemNotificationChannelTest.php +++ b/tests/lib/Channel/SystemNotificationChannelTest.php @@ -36,7 +36,7 @@ final class SystemNotificationChannelTest extends TestCase protected function setUp(): void { - $this->repository = $this->createStub(Repository::class); + $this->repository = self::createStub(Repository::class); $this->notificationService = $this->createMock(NotificationService::class); $this->channel = new SystemNotificationChannel($this->repository, $this->notificationService); @@ -47,10 +47,10 @@ public function testSupports(bool $supportedNotification, bool $supportedRecipie { $notification = $supportedNotification ? $this->createSupportedNotification() - : $this->createStub(Notification::class); + : self::createStub(Notification::class); $recipient = $supportedRecipient ? $this->createSupportedRecipient() - : $this->createStub(RecipientInterface::class); + : self::createStub(RecipientInterface::class); self::assertEquals($expectedResult, $this->channel->supports($notification, $recipient)); } diff --git a/tests/lib/Mapper/NotificationMapperTest.php b/tests/lib/Mapper/NotificationMapperTest.php index 8ea3f65..9fddc96 100644 --- a/tests/lib/Mapper/NotificationMapperTest.php +++ b/tests/lib/Mapper/NotificationMapperTest.php @@ -26,7 +26,7 @@ public function setUp(): void public function testMapToSymfonyNotificationForSymfonyAdapter(): void { - $notification = $this->createStub(Notification::class); + $notification = self::createStub(Notification::class); $symfonyNotification = $this->mapper->mapToSymfonyNotification( new SymfonyNotificationAdapter($notification) @@ -49,7 +49,7 @@ public function testMapToSymfonyNotificationThrowsExceptionOnInvalidNotification $this->expectException(InvalidArgumentException::class); $this->mapper->mapToSymfonyNotification( - $this->createStub(NotificationInterface::class) + self::createStub(NotificationInterface::class) ); } } diff --git a/tests/lib/Mapper/RecipientMapperTest.php b/tests/lib/Mapper/RecipientMapperTest.php index 18c17a9..cd9c8f2 100644 --- a/tests/lib/Mapper/RecipientMapperTest.php +++ b/tests/lib/Mapper/RecipientMapperTest.php @@ -26,7 +26,7 @@ public function setUp(): void public function testMapToSymfonyRecipient(): void { - $recipient = $this->createStub(Recipient::class); + $recipient = self::createStub(Recipient::class); $symfonyRecipient = $this->mapper->mapToSymfonyRecipient( new SymfonyRecipientAdapter($recipient) @@ -40,7 +40,7 @@ public function testMapToSymfonyRecipientThrowsExceptionOnInvalidRecipient(): vo $this->expectException(InvalidArgumentException::class); $this->mapper->mapToSymfonyRecipient( - $this->createStub(RecipientInterface::class) + self::createStub(RecipientInterface::class) ); } } diff --git a/tests/lib/SubscriptionResolver/ChainSubscriptionResolverTest.php b/tests/lib/SubscriptionResolver/ChainSubscriptionResolverTest.php index 22af3d3..a680c53 100644 --- a/tests/lib/SubscriptionResolver/ChainSubscriptionResolverTest.php +++ b/tests/lib/SubscriptionResolver/ChainSubscriptionResolverTest.php @@ -30,7 +30,7 @@ public function testResolve(array $resolverChannels, array $expectedChannels): v $subscriptionResolver = new ChainSubscriptionResolver($resolvers); - $notification = $this->createStub(NotificationInterface::class); + $notification = self::createStub(NotificationInterface::class); $channels = $subscriptionResolver->resolve($notification); self::assertSame($expectedChannels, iterator_to_array($channels));