Yii Framework Forum: Upgrade from Yii 2.0.11 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Upgrade from Yii 2.0.11 Rate Topic: -----

#1 User is offline   rsmith284 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 1
  • Joined: 13-November 17

Posted 13 November 2017 - 09:23 PM

Hello. I have a question conserning the Upgrade from Yii 2.0.11

yii\filters\AccessControl now can be used without user component.
In this case yii\filters\AccessControl::denyAccess() throws yii\web\ForbiddenHttpException and using AccessRule matching a role throws yii\base\InvalidConfigException

As there is only one method mentioned (denyAccess) i do assume that this mentioned method potentially throws the ForbiddenHttpException and ForbiddenHttpException. As far as the phpdoc does not show any possibility of a InvalidConfigException and i can't find any source within the denyAccess-method which would throw this exception aswell.

I might be missunderstanding this upgrade-notice or it is in fact unclear. Could someone enlighten me if possible?

#2 User is offline   alrazi 

  • Elite Member
  • Yii
  • Group: Moderators
  • Posts: 1,546
  • Joined: 08-August 12
  • Location:Durban, South Africa

Posted 14 November 2017 - 12:13 AM

AccessControl does not throw InvalidConfigException it is Yii::createObject that throws this error, I am assuming your config for accesscontrol filter is messed up, can you paste your code here for your filters.

Share this topic:

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users