Update Yii2.php

We should check an interface otherwise we can't test project on mongodb or another databases