使用Symfony本地服务器时弃用ServerBundle



我正在使用Symfony 4.4.2
当我使用服务器捆绑包运行服务器时...

./bin/console server:run

。我收到弃用警告:

User Deprecated: Using the WebserverBundle is deprecated since Symfony 4.4. The new Symfony local server has more features, you can use it instead.

所以我安装了Symfony本地服务器,现在我正在使用它:

symfony server:start --no-tls

但是,弃用仍然存在。
为什么?

你已经在项目中包含了 WebserverBundle bundle,但是这个bundle在Symfony 4.4之后将被弃用。正如 Cerad 所解释的那样,捆绑包本身很好,你现在仍然可以使用它,但这仅仅意味着如果你将项目更新到 Symfony 5,您将无法再使用它。

如果您不使用捆绑包并希望删除弃用消息,只需运行以下命令:

composer remove symfony/web-server-bundle

最新更新