heroku yii migrate error

[font=Consolas,][size=2]hey guys, I have a basic yii app working locally and on a ubuntu server in aws.[/size][/font][font=Consolas,] [/font][font=Consolas,]I’m trying to push the app to heroku… everything is working except yii migrate… when I run a migrate i get this error “Exception ‘ReflectionException’ with message ‘Class yii\gii\Module does not exist’”[/font][font=Consolas,] [/font][font=Consolas,]any ideas?[/font][font=Consolas,] [/font][font=Consolas,]I’ve googled around and only found one recommendation to rerun composer.[/font][font=Consolas,] [/font][font=Consolas,]Did that… no dice![/font]

I figured this out for those that are interested. Heroku config vars for the app need to be set for YII_ENV and YII_DEBUG.

I figured this out by first removing only require-dev modules from composer, and making this all required, this made everything work but clearly not secure. I returned the models to the require-dev block, added the vars to the heroku config, and then it all worked.

Simple fix, but took a while to figure out :(

I have exactly same issue. But it’s haunting me even after I’ve set my heroku config variables. I’ve set:

YII_ENV=prod YII_DEBUG=false. Maybe you have any ideas about what else could cause this?