diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a41330b..d01ecaf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,10 +10,12 @@ jobs: matrix: php: - version: 8.0 - coverage: true + coverage: false - version: 8.1 coverage: false - version: 8.2 + coverage: true + - version: 8.3 coverage: false prefer-lowest: ["", "--prefer-lowest"] diff --git a/composer.json b/composer.json index a1ee7f2..c9fef42 100644 --- a/composer.json +++ b/composer.json @@ -20,8 +20,8 @@ "minimum-stability": "stable", "require": { "php": "^8.0", - "symfony/console": "^6.0", - "symfony/event-dispatcher": "^6.0", + "symfony/console": "^6.0 || ^7.0", + "symfony/event-dispatcher": "^6.0 || ^7.0", "laminas/laminas-escaper": "^2.12", "laminas/laminas-filter": "^2.31", "laminas/laminas-servicemanager": "^3.0 || ^2.2", @@ -30,7 +30,7 @@ "require-dev": { "behat/behat": "^3.12", "mikey179/vfsstream": "^1.6.11", - "phpunit/phpunit": "^9.6.3", + "phpunit/phpunit": "^9.6.3 || ^10.0", "vimeo/psalm": "^5.6", "laminas/laminas-coding-standard": "^2.5", "phpspec/prophecy": "^1.17", diff --git a/tests/src/Cli/Command/ExceptionGeneratorCommandTest.php b/tests/src/Cli/Command/ExceptionGeneratorCommandTest.php index 4620740..0532d24 100644 --- a/tests/src/Cli/Command/ExceptionGeneratorCommandTest.php +++ b/tests/src/Cli/Command/ExceptionGeneratorCommandTest.php @@ -67,8 +67,8 @@ public function executeNoParents(): void $input->getOption('no-parents')->willReturn(true); $input->getOption('template-path')->willReturn(vfsStream::url('cwd/template_path')); - $input->bind(Argument::type(InputDefinition::class))->willReturn(null); - $input->validate()->willReturn(null); + $input->bind(Argument::type(InputDefinition::class)); + $input->validate(); $output->writeln( 'Using path for templates: "vfs://cwd/template_path"', @@ -148,8 +148,8 @@ public function executeParents(): void $input->getOption('no-parents')->willReturn(false); $input->getOption('template-path')->willReturn(vfsStream::url('cwd/template_path')); - $input->bind(Argument::type(InputDefinition::class))->willReturn(null); - $input->validate()->willReturn(null); + $input->bind(Argument::type(InputDefinition::class)); + $input->validate(); $output->writeln( 'Using path for templates: "vfs://cwd/template_path"', diff --git a/tests/src/Generator/RecursiveNamespaceResolverTest.php b/tests/src/Generator/RecursiveNamespaceResolverTest.php index 8145889..906bb1a 100644 --- a/tests/src/Generator/RecursiveNamespaceResolverTest.php +++ b/tests/src/Generator/RecursiveNamespaceResolverTest.php @@ -266,15 +266,14 @@ public static function provideTestDirectories(): array public function testRegisterDefaultListeners(): void { $eventDispatcher = $this->prophesize(EventDispatcher::class); - $eventDispatcher->addSubscriber(Argument::type(EventSubscriberInterface::class)) - ->shouldBeCalledTimes(4) - ->will(fn (array $args) => match (get_class($args[0])) { + $eventDispatcher->addSubscriber(Argument::that(fn (EventSubscriberInterface $es) => match (get_class($es)) { PHPFileListener::class => true, ComposerJsonListener::class => true, GitDirectoryListener::class => true, RootDirectoryListener::class => true, default => $this->fail('Unknown listener') - }); + })) + ->shouldBeCalledTimes(4); $object = new RecursiveNamespaceResolver($eventDispatcher->reveal()); $this->assertInstanceOf(EventDispatcher::class, $object->getEventDispatcher()); diff --git a/tests/src/Generator/RecursiveParentExceptionResolverTest.php b/tests/src/Generator/RecursiveParentExceptionResolverTest.php index 09a7b45..5fa6eac 100644 --- a/tests/src/Generator/RecursiveParentExceptionResolverTest.php +++ b/tests/src/Generator/RecursiveParentExceptionResolverTest.php @@ -133,14 +133,13 @@ public function resolveExceptionDirsRoot(): void public function addDefaultSubscribers(): void { $eventDispatcher = $this->prophesize(EventDispatcherInterface::class); - $eventDispatcher->addSubscriber(Argument::type(EventSubscriberInterface::class)) - ->shouldBeCalledTimes(3) - ->will(fn (array $args) => match (get_class($args[0])) { + $eventDispatcher->addSubscriber(Argument::that(fn (EventSubscriberInterface $es) => match (get_class($es)) { GitDirectoryListener::class => true, RootDirectoryListener::class => true, ExceptionDirListener::class => true, default => $this->fail('Unknown listener') - }); + })) + ->shouldBeCalledTimes(3); $object = new RecursiveParentExceptionResolver($eventDispatcher->reveal()); $this->assertInstanceOf(EventDispatcherInterface::class, $object->getEventDispatcher());