composer civicrm:publish doesn't work with composer 2.3 because it uses symfony/console 5
Composer v2.3 now has symfony/console v5: https://github.com/composer/composer/blob/2.3.3/composer.lock#L810
It has this: https://github.com/symfony/console/blob/v5.4.5/Command/Command.php#L301
$statusCode = $this->execute($input, $output);
if (!\is_int($statusCode)) {
throw new \TypeError(sprintf('Return value of "%s::execute()" must be of the type int, "%s" returned.', static::class, get_debug_type($statusCode)));
}
So now you get an error:
> composer civicrm:publish
Publishing CiviCRM assets to web/libraries/civicrm
Generating CiviCRM asset map
In Command.php line 301:
[TypeError]
Return value of "Civi\AssetPlugin\Command\CivicrmPublishCommand::execute()" must be of the type int, "null" returne
d.
Exception trace:
at phar://.../composer.phar/vendor/symfony/console/Command/Command.php:301
Symfony\Component\Console\Command\Command->run() at phar://.../composer.phar/vendor/symfony/console/Application.php:1015
I guess Civi\AssetPlugin\Command\CivicrmPublishCommand::execute() could just always return 0?
Edited by DaveD