Yii2 Error: Class dektrium\rbac\Module does not exist

1.4k Views Asked by At

I have just updated my composer and after that when i run my Yii2 application i got this error "Class dektrium\rbac\Module does not exist" i am using rbac in my application.

I checked desctrium\rabc directory there is no file with Module class. However i can see two new files RbacWebModule, RbacConsoleModule in that directoy.

I have a backup of my application on other server. so do i have to put my backup there to correct this error or is there any other solution. i can see in my vendor folder all other folders also get updated with composer update. So how to get rid of this error.

Thanks in advance.

1

There are 1 best solutions below

0
On

This class has been renamed over a month ago. Since it's still beta I recommend to check for any major changes with every upgrade. Always follow the instruction.

Add rbac module to web application config file as follows:

...
'modules' => [
    ...
    'rbac' => 'dektrium\rbac\RbacWebModule',
    ...
],
...