Yii::import() not working in "Using Yii 2 with Yii 1"

So I follow the guide here:


for somereason all Yii::import() inside class are not working.

for example I have a widget that extend CPortlet like this


class sideWidget extends CPortlet{


it will generate error "include(CPortlet.php): failed to open stream: No such file or directory"

I was able to workaround it by included zii.widget.* inside config/main.php import

but then some class like CJavaScript::quote will generate another error because it use


this is also resolvable by putting ‘system.vendors.zend-escaper.*’ in the config/main.php import

but then it would require me to put all the import be it inside the framework or my own project into config.

Did I miss something here?