Skip to content

PHP Fatal error: Declaration of Psalm\Internal\Fork\PsalmRestarter::restart(array $command): void must be compatible with Composer\XdebugHandler\XdebugHandler::restart($command) #9345

@mfn

Description

@mfn

I just disovered this on https://github.com/barryvdh/laravel-ide-helper/actions/runs/4213330503/jobs/7321722540#step:5:12

PHP Fatal error:  Declaration of Psalm\Internal\Fork\PsalmRestarter::restart(array $command): void must be compatible with Composer\XdebugHandler\XdebugHandler::restart($command) in /home/runner/work/laravel-ide-helper/laravel-ide-helper/vendor/vimeo/psalm/src/Psalm/Internal/Fork/PsalmRestarter.php on line 79
Fatal error: Declaration of Psalm\Internal\Fork\PsalmRestarter::restart(array $command): void must be compatible with Composer\XdebugHandler\XdebugHandler::restart($command) in /home/runner/work/laravel-ide-helper/laravel-ide-helper/vendor/vimeo/psalm/src/Psalm/Internal/Fork/PsalmRestarter.php on line 79
Script psalm handling the analyze event returned with error code 255
Error: Process completed with exit code 255.

I can also reproduce this locally with php 8.2.3 when I checkout laravel-ide-helper and run composer analyze, which in turn just runs psalm.

As can be seen in the action history, this is a new break so I guess it may be related to https://github.com/vimeo/psalm/releases/tag/5.7.0

I can confirm with psalm 5.6.0 I don't get this error.

+ $ composer --version
Composer version 2.5.4 2023-02-15 13:10:06

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions