Skip to content

Double $kernel->boot() on console commands #29505

@FredM

Description

@FredM

Having something to do in my kernel->boot() method I noticed this behaviour: the method is called twice when running a command.
https://github.com/symfony/framework-bundle/blob/master/Console/Application.php#L65
https://github.com/symfony/framework-bundle/blob/master/Console/Application.php#L161

Is there a reason?

My Kernel.php boot method ends up like this, to avoid double booting stuff

    public function boot()
    {
        if (!$this->booted) {
            [...]
        }
        parent::boot();
    }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions