yiisoft / yii2

Yii 2: The Fast, Secure and Professional PHP Framework
http://www.yiiframework.com
BSD 3-Clause "New" or "Revised" License
14.24k stars 6.91k forks source link

Mongo DB RBAC missing new getChildRoles() interface in update to 2.0.10 #12872

Closed bluedreamer closed 8 years ago

bluedreamer commented 8 years ago

What steps will reproduce the problem?

Upgrade to 2.0.10

What is the expected result?

That is kept working

What do you get instead?

PHP Fatal error: Class yii\mongodb\rbac\MongoDbManager contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (yii\rbac\ManagerInterface::getChildRoles) in /vagrant/www/redata/vendor/yiisoft/yii2-mongodb/rbac/MongoDbManager.php on line 38 PHP Fatal Error 'yii\base\ErrorException' with message 'Class yii\mongodb\rbac\MongoDbManager contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (yii\rbac\ManagerInterface::getChildRoles)'

in /vagrant/www/redata/vendor/yiisoft/yii2-mongodb/rbac/MongoDbManager.php:38

Stack trace:

0 [internal function]: yii\base\ErrorHandler->handleFatalError()

1 {main}

Additional info

It appears this change Enh #11245: Added yii\rbac\ManagerInterface::getChildRoles() method, allowing finding child roles for the given one (githubjeka)

And this upgrade note RBAC: getChildRoles() method was added to \yii\rbac\ManagerInterface. If you've implemented your own RBAC manager you need to implement new method.

Where not done for MongoDB

Q A
Yii version 2.0.10
PHP version 5.4.16
Operating system Centos 7.2
klimov-paul commented 8 years ago

Duplicates https://github.com/yiisoft/yii2-mongodb/issues/153