I'm developping an app with Zend-framework 3 which needs user's role management. I'm using zend-permission-rbac component to do so.
But i keep having an error :
File: /home/myhost/ppvc/module/User/src/Service/RbacManager.php:77
Message: Class 'Zend\Permissions\Rbac\Rbac' not found
Here's a part of the stack trace if it can help :
This error pop when i instatiate my Rbac container for the first time :
public function init($forceCreate = false)
{
if ($this->rbac!=null && !$forceCreate) {
// Already initialized; do nothing.
return;
}
// If user wants us to reinit RBAC container, clear cache now.
if ($forceCreate) {
$this->cache->removeItem('rbac_container');
}
// Try to load Rbac container from cache.
$result = false;
$this->rbac = $this->cache->getItem('rbac_container', $result);
if (!$result)
{
// Create Rbac container.
$rbac = new Rbac();
$this->rbac = $rbac;
.....
Also i'm calling my Rbac class correctly :
use Zend\Permissions\Rbac\Rbac;
I can't undestand where this error come from, it looks like the vendor/zend-permissions-rbac folder isn't "read" by the app. I 've updated the composer.json and composer.lock files and check them, my module is correctly called (composer.json):
"zendframework/zend-permissions-rbac": "^3.0",
I'm following this tutorial : Role-Based Access Control
Any help is welcome ! (Sorry if i made mistakes, english is not my language)
EDIT : i've checked my PHP verion for return type declarations (Because the Rbac module is full of it), but i'm in 7.2 so no problem with that.
Maxime