refactoring for recent Yii2 changes