psalm / phar

A place for Psalm's Phar to live in a composer-versioned setting
https://psalm.dev
24 stars 4 forks source link

PHP Error: Declaration of X should be compatible with Y #11

Open f1amy opened 2 years ago

f1amy commented 2 years ago

Hello, I'm getting the following error on psalm/phar installations from v4.17.0 to the latest version.

Running the command ./bin/psalm.phar --update-baseline:

Uncaught RuntimeException: PHP Error: Declaration of Psalm\Internal\Fork\PsalmRestarter::requiresRestart($default): bool should be compatible with _HumbugBox313437bf04ad\Composer\XdebugHandler\XdebugHandler::requiresRestart(bool $default): bool in phar:///var/www/app/vendor/psalm/phar/psalm.phar/src/Psalm/Internal/Fork/PsalmRestarter.php:15 in phar:///var/www/app/vendor/psalm/phar/psalm.phar/src/Psalm/Internal/ErrorHandler.php:53
Stack trace:
#0 phar:///var/www/app/vendor/psalm/phar/psalm.phar/src/Psalm/Internal/Fork/PsalmRestarter.php(15): Psalm\Internal\ErrorHandler::Psalm\Internal\{closure}(2, 'Declaration of ...', 'phar:///var/www...', 15, Array)
#1 phar:///var/www/app/vendor/psalm/phar/psalm.phar/.box/vendor/composer/ClassLoader.php(444): include('phar:///var/www...')
#2 phar:///var/www/app/vendor/psalm/phar/psalm.phar/.box/vendor/composer/ClassLoader.php(322): Composer\Autoload\includeFile('phar:///var/www...')
#3 [internal function]: Composer\Autoload\ClassLoader->loadClass('Psalm\\Internal\\...')
#4 phar:///var/www/app/vendor/psalm/phar/psalm.phar/src/Psalm/Internal/Cli/Psalm.php(569): spl_autoload_call('Psalm\\Internal\\...')
#5 phar:///var/www/app/vendor/psalm/phar/psalm.phar/src/Psalm/Internal/Cli/Psalm.php(206): Psalm\Internal\Cli\Psalm::restart(Array, Object(Psalm\Config), 1)
#6 phar:///var/www/app/vendor/psalm/phar/psalm.phar/psalm(7): Psalm\Internal\Cli\Psalm::run(Array)
#7 /var/www/app/vendor/psalm/phar/psalm.phar(14): require('phar:///var/www...')
#8 {main}
(Psalm 4.x-dev@ crashed due to an uncaught Throwable)