Skip to content

Commands broken with symfony/console 7.4 #56048

Closed
@berbeflo

Description

@berbeflo

Laravel Version

12.18.0

PHP Version

8.4.6

Database Driver & Version

No response

Description

In this commit symfony deprecated namespace Symfony\Component\Console\Application::add and replaced all calls with a call to the new method addCommand.

Illuminate\Console\Application extends Symfony\Component\Console\Application and overrides add. In add the command's method setLaravel is called if the command is an instance of Illuminate\Console\Command.

What now happens: addCommand is called, so the method setLaravel is never called. This leads to a null pointer exception in Illuminate\Console\Command::run.

My current workaround is to require version 7.3 of symfony/console. But I don't think, that's a long term solution.

Steps To Reproduce

composer update
php artisan route:list

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions