Symfony 4.0 FOSUser 捆绑包 2.0

Symfony 4.0 FOSUser Bundle 2.0

我想将 FOSUser Bundle 2.0 与 symfony 4.0 一起使用,但在互联网上的所有教程中都有我没有的文件夹应用程序。

我做了什么:

通过 Composer 安装 FOSUser Bundle 2.0:

$ composer require friendsofsymfony/user-bundle "~2.0"

然后我就完成了,因为需要 /app 文件夹和一些我没有的文件。 任何解决方案?

在 Symfony 4 中,app/ 文件夹被替换为 config/

引自Fabien Potencier's blog

Using well-known directory names helps. Using bin/, src/, or var/ was a great step forward. Symfony 4 adds etc/ in place of app/. It was proposed for Symfony 3 but rejected for reasons that don't hold anymore.

Update: The etc/ has been changed to config/ after a long discussion with the community. The web/ directory has also been changed to public/. The blog posts about Symfony 4 have been updated to reflect these changes.