diff --git a/src/Psalm/Internal/Fork/PsalmRestarter.php b/src/Psalm/Internal/Fork/PsalmRestarter.php index a8bbc50761c..7849d888707 100644 --- a/src/Psalm/Internal/Fork/PsalmRestarter.php +++ b/src/Psalm/Internal/Fork/PsalmRestarter.php @@ -140,7 +140,7 @@ private static function toBytes(string $value): int /** * No type hint to allow xdebug-handler v1 and v2 usage * - * @param string[] $command + * @param non-empty-list $command * @phpcsSuppress SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingNativeTypeHint */ protected function restart($command): void @@ -178,6 +178,7 @@ protected function restart($command): void 0, $additional_options, ); + assert(count($command) > 0); parent::restart($command); } diff --git a/tests/fixtures/SuicidalAutoloader/autoloader.php b/tests/fixtures/SuicidalAutoloader/autoloader.php index d506219c141..33ce6e511f2 100644 --- a/tests/fixtures/SuicidalAutoloader/autoloader.php +++ b/tests/fixtures/SuicidalAutoloader/autoloader.php @@ -10,6 +10,7 @@ Transliterator::class, // symfony/string InstalledVersions::class, // composer v2 'Mockery\Closure', // Mockery/mockery 1.6.1 + 'Mockery\Matcher\TExpected', // Mockery/mockery, invalid template usage 'parent', // it's unclear why Psalm tries to autoload parent 'PHPUnit\Framework\ArrayAccess', 'PHPUnit\Framework\Countable',