m4b-tool: box.phar is not compatible with latest PHP 8.3

Thanks for some great software! I’m having some trouble with --musicbrainz-id and was attempting to build from source. I don’t have Docker and really don’t want to install it / run it, so I’m working with ./build on my machine.

Attempting to run ./build on macOS shows the following exception. PHP 8.3.13 and Compose 2.8.2.

tools/box.phar appears to be incompatible with… something.

Fatal error: During inheritance of IteratorAggregate: Uncaught ErrorException: Return type of Symfony\Component\Console\Helper\HelperSet::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///private/tmp/m4b-tool-20241111-29505-wfq37b/tools/box.phar/src/vendors/symfony/console/Symfony/Component/Console/Helper/HelperSet.php:104
Stack trace:
#0 phar:///private/tmp/m4b-tool-20241111-29505-wfq37b/tools/box.phar/src/vendors/symfony/console/Symfony/Component/Console/Helper/HelperSet.php(21): KevinGH\Box\Application->KevinGH\Box\{closure}(8192, 'Return type of ...', 'phar:///private...', 104)
#1 phar:///private/tmp/m4b-tool-20241111-29505-wfq37b/tools/box.phar/src/vendors/composer/ClassLoader.php(414): include('phar:///private...')
#2 phar:///private/tmp/m4b-tool-20241111-29505-wfq37b/tools/box.phar/src/vendors/composer/ClassLoader.php(301): Composer\Autoload\includeFile('phar:///private...')
#3 phar:///private/tmp/m4b-tool-20241111-29505-wfq37b/tools/box.phar/src/vendors/symfony/console/Symfony/Component/Console/Application.php(951): Composer\Autoload\ClassLoader->loadClass('Symfony\\Compone...')
#4 phar:///private/tmp/m4b-tool-20241111-29505-wfq37b/tools/box.phar/src/lib/KevinGH/Box/Application.php(115): Symfony\Component\Console\Application->getDefaultHelperSet()
#5 phar:///private/tmp/m4b-tool-20241111-29505-wfq37b/tools/box.phar/src/vendors/symfony/console/Symfony/Component/Console/Application.php(88): KevinGH\Box\Application->getDefaultHelperSet()
#6 phar:///private/tmp/m4b-tool-20241111-29505-wfq37b/tools/box.phar/src/lib/KevinGH/Box/Application.php(38): Symfony\Component\Console\Application->__construct('Box', '2.7.5')
#7 phar:///private/tmp/m4b-tool-20241111-29505-wfq37b/tools/box.phar/bin/box(18): KevinGH\Box\Application->__construct()
#8 /private/tmp/m4b-tool-20241111-29505-wfq37b/tools/box.phar(12): require('phar:///private...')
#9 {main} in phar:///private/tmp/m4b-tool-20241111-29505-wfq37b/tools/box.phar/src/vendors/symfony/console/Symfony/Component/Console/Helper/HelperSet.php on line 21
$ php --version
PHP 8.3.13 (cli) (built: Oct 22 2024 18:39:14) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.13, Copyright (c) Zend Technologies
    with Zend OPcache v8.3.13, Copyright (c), by Zend Technologies
$ composer --version
Composer version 2.8.2 2024-10-29 16:12:11
PHP version 8.3.13 (/opt/homebrew/Cellar/php/8.3.13_1/bin/php)
Run the "diagnose" command to get more detailed diagnostics output.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 16 (16 by maintainers)

Most upvoted comments

Hey, this looks great! Thanks so much for doing this and pushing out a new release. I have been traveling so haven’t had time to use the new release yet but hope to in the coming days test it out. I can help with a Homebrew formula if you’d like. I believe it could download the latest phar release and symlink. It would depend on PHP IIUC, perhaps with a version constraint if needed.