should be 
```
$this->db = Yii::$app->getComponent($this->db);
```