How is setting YII_DEBUG to true different from setting YII_ENV_DEV to true (or YII_ENV to ‘dev’)? What does enabling YII_DEBUG do which enabling YII_ENV_DEV doesn’t, and what does enabling YII_ENV_DEV do which enabling YII_DEBUG doesn’t? And what difference does setting YII_ENV to ‘dev’ instead of ‘prod’ make ?
And in Guide > Key Concepts > Configurations > Environment Constants
In short:
YII_DEBUG … Yii will run in the debug mode and more detailed error information will be logged. This happens in the framework level.
YII_ENV_DEV … It says that you are in the development environment. But It’s all up to you what you do with it. But usually you may want to enable “debug” and “gii” modules. That’s what “app-basic” and “app-advanced” templates do for you. And probably you may want to use a different db configuration for the development environment.