Skip to content

[FrameworkBundle] Can't use container:lint command #60920

Closed
@fbuchlak

Description

@fbuchlak

Symfony version(s) affected

7.4.x-dev

Description

After updating symfony/framework-bundle bin/console container:lint command fails to run due to undefined method isDebug on container.

How to reproduce

symfony new --no-git --version=next test
cd test
bin/console lint:container -vvv

Possible Solution

No response

Additional Context

symfony new --no-git --version=next test

  • Creating a new Symfony 7.4.x@dev project with Composer
    WARNING: Detected Composer file (/home/frederik/.nix-profile/bin/composer) is not a valid PHAR or PHP script.
    Downloading Composer for you, but it is recommended to install Composer yourself, instructions available at https://getcomposer.org/download/
    (running php /home/frederik/.symfony5/composer/composer.phar create-project symfony/skeleton /home/frederik/test 7.4.x@dev --no-interaction)

[OK] Your project is now ready in /home/frederik/test

cd test
bin/console lint:container
[critical] Error thrown while running command "lint:container". Message: "Call to undefined method Container9IAgk5f\App_KernelDevDebugContainer::isDebug()"
[critical] Uncaught Error: Call to undefined method Container9IAgk5f\App_KernelDevDebugContainer::isDebug()

In ContainerLintCommand.php line 83:

Attempted to call an undefined method named "isDebug" of class "Container9IAgk5f\App_KernelDevDebugContainer".

lint:container [--resolve-env-vars]

vi
bin/console lint:container -vvv
[critical] Error thrown while running command "lint:container -vvv". Message: "Call to undefined method Container9IAgk5f\App_KernelDevDebugContainer::isDebug()"
[debug] Command "lint:container -vvv" exited with code "1"
[critical] Uncaught Error: Call to undefined method Container9IAgk5f\App_KernelDevDebugContainer::isDebug()

In ContainerLintCommand.php line 83:

[Symfony\Component\ErrorHandler\Error\UndefinedMethodError]
Attempted to call an undefined method named "isDebug" of class "Container9IAgk5f\App_KernelDevDebugContainer".

Exception trace:
at /home/frederik/test/vendor/symfony/framework-bundle/Command/ContainerLintCommand.php:83
Symfony\Bundle\FrameworkBundle\Command\ContainerLintCommand->getContainerBuilder() at /home/frederik/test/vendor/symfony/framework-bundle/Command/ContainerLintCommand.php:53
Symfony\Bundle\FrameworkBundle\Command\ContainerLintCommand->execute() at /home/frederik/test/vendor/symfony/console/Command/Command.php:343
Symfony\Component\Console\Command\Command->run() at /home/frederik/test/vendor/symfony/console/Application.php:1108
Symfony\Component\Console\Application->doRunCommand() at /home/frederik/test/vendor/symfony/framework-bundle/Console/Application.php:123
Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() at /home/frederik/test/vendor/symfony/console/Application.php:343
Symfony\Component\Console\Application->doRun() at /home/frederik/test/vendor/symfony/framework-bundle/Console/Application.php:77
Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /home/frederik/test/vendor/symfony/console/Application.php:194
Symfony\Component\Console\Application->run() at /home/frederik/test/vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:49
Symfony\Component\Runtime\Runner\Symfony\ConsoleApplicationRunner->run() at /home/frederik/test/vendor/autoload_runtime.php:29
require_once() at /home/frederik/test/bin/console:15

lint:container [--resolve-env-vars]

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