nvlad / yii2support

Yii2 Support for PhpStorm / IntelliJ IDEA
https://plugins.jetbrains.com/idea/plugin/9388-yii2-support
Other
294 stars 52 forks source link

MissingActiveRecordInActiveQueryInspection ignore "use" block. #158

Open ilgiz-badamshin opened 6 years ago

ilgiz-badamshin commented 6 years ago

Plugin version: 0.7.35.2. Model class:

<?php
namespace common\models;

use yii\db\ActiveRecord;

class MyModel extends ActiveRecord {...}

Query class in subfolder with another namespace:

<?php 
namespace common\models\queries;

use common\models\MyModel;
use yii\db\ActiveQuery;

/**
 * @see MyModel
 */
class MyModelQuery extends \yii\db\ActiveQuery {...}

It trigger: Can not find connected ActiveRecord class.

Jooseph commented 5 years ago

Can not find connected ActiveRecord class. You should add @see tag with linked ActiveRecord. Inspection info: Check if ActiveQuery correctly linked to ActiveRecord

i have used @see tag as @see MyActiveRecord::find() . But it does't work.