symfony 服务器和 bin/console 服务器之间的区别?

Difference between symfony server and bin/console server?

我想使用 Symfony 网络服务器进行本地开发,但令我惊讶的是 Symfony 实际上带有 两个 服务器:

我发现这两个选项让我很困惑,因为文档似乎没有给你任何提示,说明为什么你应该使用一个而不是另一个,以及在什么情况下。

据我所知,它看起来像 Web 服务器包 (bin/console server:start):

而 Symfony 本地网络服务器 (symfony server:start):

不过,我还是很难理解他们为什么要发布这两个选项。乍一看,Symfony 本地 Web 服务器似乎更强大;在这种情况下,他们为什么还要发布网络服务器包?

Web Server Bundle docs所述:

Deprecated since version 4.4: This article explains how to use the WebServerBundle to run Symfony applications on your local computer. However, that bundle is deprecated since Symfony 4.4 and will be removed in Symfony 5.0.

Instead of using WebServerBundle, the preferred way to run your Symfony applications locally is to use the Symfony Local Web Server.

所以推荐的方法是使用symfony server:start为开发中的应用程序提供服务。

感谢@Cerad 和@Jakub Matczak 的评论。