Web-Response, how to make it an extension


I have created an extension, but i dont know how Yii2 can autload it when i try use:


Controller example:


namespace app\controllers;

use com\prsolucoes\WebResponse;

use Yii;

use yii\web\Controller;

class TestController extends Controller


    public function actionIndex()


        $response = new WebResponse();


        return $response;



Add to you "composer.json", on "require" tag:

If i copy to my "app\models" folder, it work. So i think that Yii2 cannot find it when i try import from "vendor" path.

Can anyone help me?

Can anyone help me?

I solve the problem creating an alias. I have posted on README.md: