Skip to content

Getting unknown property: yii\rest\UrlRule::name #10231

@bscheshirwork

Description

@bscheshirwork

When creating REST controller rest for module user I have the following properties of the module

    public $urlRules = [
        [
            'class' => 'yii\rest\UrlRule',
            'controller' => ['user/users'=>'user/rest'], //http://www.yiiframework.com/doc-2.0/yii-rest-urlrule.html
        ],
    ...
    ];

but when I turn to the address /user/users the script returns an error Getting unknown property: yii\rest\UrlRule::name

really logger tries to access this property
Yii::trace("Request parsed with URL rule: {$rule->name}", __METHOD__);

$rule
in
vendor/yiisoft/yii2/web/CompositeUrlRule.php:51

but in this class this property does not exist.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions