schmunk42 / yii2-giiant

Yii 2 Framework Code Generator Gii on Steroids
271 stars 120 forks source link

Fixed closing of db when set via DI #271

Closed rhertogh closed 3 years ago

rhertogh commented 4 years ago

When the db connection name is specified via DI configuration (and therefore not a component of the app) the connection could not be found. This pull requests fixes this by first checking the DI container similar to schmunk42\giiant\generators\model\Generator::getDbConnection().

schmunk42 commented 3 years ago

fixed in https://github.com/schmunk42/yii2-giiant/pull/276 with updated test-setup

Thank you!