server:run Exception There are no commands defined in the “server” namespace

前端 未结 13 1392
甜味超标
甜味超标 2020-12-25 10:17

When I run the server using php bin/console server:run I get the following error. There are no commands defined in the \"server\" namespace.

<
相关标签:
13条回答
  • 2020-12-25 10:56

    upgrading from symfony <3.3 to symfony >3.3 will cause this problem because the web server was extracted out to a separate bundle.

    so you'll need to require this bundle:

    composer require symfony/web-server-bundle --dev
    

    and in your AppKernel

     if ('dev' === $this->getEnvironment()) {
            $bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
        }
    

    for more info: check here

    0 讨论(0)
提交回复
热议问题