简体   繁体   中英

Symfony is not generating bundle

I installed fresh Symfony (with "symfony new test") on a fresh LAMP system. I'm trying to generate a bundle but it fails. The output is:

tugrul@tugrul-mint ~/tmp/test2 $ php app/console generate:bundle --namespace NV/TestdBundle --bundle-name=NVTestdBundle --dir=/home/tugrul/tmp/test2/src --format yml --structure

Welcome to the Symfony2 bundle generator  
BLABLABLA
Do you confirm generation [yes]? 

 Bundle generation  

[Twig_Error_Syntax]                                                                                                                                                                      
An exception has been thrown during the compilation of a template ("Level "info" is not defined, use one of: 100, 200, 250, 300, 400, 500, 550, 600") in "bundle/index.html.twig.twig".  

[Psr\Log\InvalidArgumentException]                                               
Level "info" is not defined, use one of: 100, 200, 250, 300, 400, 500, 550, 600  

PHP version:

$ php -v
PHP 5.5.9-1ubuntu4.13 (cli) (built: Sep 29 2015 15:24:49) 

On the production server with exact same version of PHP, Symfony are successfully create a bundle, but not on the local development box.

Am I missing something? Or is there anything to be installed first to run symfony that not mentioned on the documentation?

Regards.

The problem was the locale. Set it to en_US.UTF-8 and its ok now. Spent 2 days for nothing...

I can't reproduce this error. The following commands work for me:

$ symfony new test
$ cd test/
$ php app/console generate:bundle --namespace=NV/TestdBundle --bundle-name=NVTestdBundle --dir=src --format=yml --structure

Note that I've changed the --dir option value to src because I'm inside the project's directory.

If still doesn't work for you, remember that you can append -vvv to any Symfony command to output very detailed error information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM