gpt4 book ai didi

php - symfony2 教程 - 生成包

转载 作者:可可西里 更新时间:2023-10-31 23:53:49 27 4
gpt4 key购买 nike

我是 symfony2 的新手,但不是 symfony。我目前正在做 the symblog tutorial .到目前为止一切正常,但是我有点卡在生成包上了?

教程说要运行下面的命令

php app/console generate:bundle --namespace=Blogger/BlogBundle --format=yml

完成后,它应该将引用/生成代码添加到

中的包中
  • app/AppKernel.php
  • 应用程序/配置/routing.yml

但是它没有添加任何东西?...我有点困惑?控制台输出以下内容,但尚未在文件中生成对包的代码引用

Welcome to the Symfony2 bundle generator  



Your application code must be written in bundles. This command helps
you generate them easily.

Each bundle is hosted under a namespace (like Acme/Bundle/BlogBundle).
The namespace should begin with a "vendor" name like your company name, your
project name, or your client name, followed by one or more optional category
sub-namespaces, and it should end with the bundle name itself
(which must have Bundle as a suffix).

See http://symfony.com/doc/current/cookbook/bundles/best_practices.html#index-1 for more
details on bundle naming conventions.

Use / instead of \ for the namespace delimiter to avoid any problem.

Bundle namespace [Blogger/BlogBundle]:

最佳答案

您可以在没有交互的情况下使用它。然后它不会问你任何事情

php app/console generate:bundle --namespace=Blogger/BlogBundle --format=yml --no-interaction

关于php - symfony2 教程 - 生成包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14483245/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com