Skip to content

Commit

Permalink
Added support for PHP 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiang committed Jan 24, 2024
1 parent 54845f8 commit 041b332
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions tests/src/Cli/Command/ExceptionGeneratorCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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"',
Expand Down Expand Up @@ -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"',
Expand Down
7 changes: 3 additions & 4 deletions tests/src/Generator/RecursiveNamespaceResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
7 changes: 3 additions & 4 deletions tests/src/Generator/RecursiveParentExceptionResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 041b332

Please sign in to comment.