Php Yii2-从2.0.13更新

Php Yii2-从2.0.13更新,php,yii2,composer-php,phpstorm,Php,Yii2,Composer Php,Phpstorm,我使用php composer.phar update将Yii2从2.0.13版更新到最后的2.0.15.1版,文档中说: 您可以通过执行以下操作开始准备Yii 2.1的应用程序: 以下: Replace ::className() calls with ::class (if you’re running PHP 5.5+). Replace usages of yii\base\InvalidParamException with yii\base\InvalidArgumentExcept

我使用
php composer.phar update
将Yii2从2.0.13版更新到最后的2.0.15.1版,文档中说:

您可以通过执行以下操作开始准备Yii 2.1的应用程序: 以下:

Replace ::className() calls with ::class (if you’re running PHP 5.5+).
Replace usages of yii\base\InvalidParamException with yii\base\InvalidArgumentException.
Replace calls to Yii::trace() with Yii::debug().
Remove calls to yii\BaseYii::powered().
If you are using XCache or Zend data cache, those are going away in 2.1 so you might want to start looking for an alternative.
像这样

public function behaviors()
    {
        return [
            'access' => [
                'class' => AccessControl::class,
                'rules' => [
                    [
                        //
                    ]
                ]
            ],
            'verbs' => [
                'class' => VerbFilter::class,
                'actions' => [
                    'delete' => ['POST'],
                ],
            ],
        ];
    }
但是PhpStorm说“类名常量仅在PHP5.5中可用 检查源代码中使用的语言功能是否与所选语言级别相对应。(即,traits只能在PHP5.4中使用)。”


我的Php是7.2.11,怎么了?

您需要在设置->语言和框架->Php: