I've upgraded my Composer-Graph installation today (to 7.1.0) which pulled in symfony/console 8.1.0, which unfortunately causes an error:
PHP Fatal error: Uncaught Error: Call to undefined method JBZoo\Cli\CliApplication::add() in /home/user/.local/lib/composer/jbzoo/cli/src/CliApplication.php:77
Stack trace:
#0 /home/user/.local/lib/composer/jbzoo/composer-graph/composer-graph.php(39): JBZoo\Cli\CliApplication->registerCommandsByPath()
#1 /home/user/.local/lib/composer/jbzoo/composer-graph/composer-graph(18): require_once('...')
#2 /home/user/.local/bin/composer-graph(119): include('...')
#3 {main}
thrown in /home/user.local/lib/composer/jbzoo/cli/src/CliApplication.php on line 77
The problem seems to be that the add function (defined in Symfony\Component\Console\Application) was deprecated in Symfony 7.4. The function was renamed to addCommand and add became a proxy calling addCommand in 7.4. In Symfony 8.0 the add proxy function was removed.
As a workaround I've pinned symfony/console to ^7.4, for now.
Thanks for providing this tool :)
I've upgraded my Composer-Graph installation today (to 7.1.0) which pulled in
symfony/console8.1.0, which unfortunately causes an error:The problem seems to be that the
addfunction (defined inSymfony\Component\Console\Application) was deprecated in Symfony 7.4. The function was renamed toaddCommandandaddbecame a proxy callingaddCommandin 7.4. In Symfony 8.0 theaddproxy function was removed.As a workaround I've pinned
symfony/consoleto^7.4, for now.Thanks for providing this tool :)