Trying out an app within Phalcon 2.0.0 and I'm getting this error when it loads up:
Fatal error: Uncaught exception 'Phalcon\Acl\Exception' with message 'Invalid value for accessList' in phalcon/acl/adapter/memory.zep:290 Stack trace: #0 [internal function]: Phalcon\Acl\Adapter\Memory->addResourceAccess('financial', NULL) #1 /var/www/vhosts/gemini.dev/public_html/vendor/phalcon/incubator/Library/Phalcon/Acl/Factory/Memory.php(85): Phalcon\Acl\Adapter\Memory->addResource(Object(Phalcon\Acl\Resource), NULL) #2 /var/www/vhosts/gemini.dev/public_html/vendor/phalcon/incubator/Library/Phalcon/Acl/Factory/Memory.php(59): Phalcon\Acl\Factory\Memory->addResources() #3 /var/www/vhosts/gemini.dev/public_html/app/config/services.php(98): Phalcon\Acl\Factory\Memory->create(Object(Phalcon\Config)) #4 [internal function]: {closure}() #5 [internal function]: Phalcon\Di\Service->resolve(NULL, Object(Phalcon\Di\FactoryDefault)) #6 [internal function]: Phalcon\Di->get('acl', NULL) #7 [internal function]: Phalcon\Di->getShared('acl') #8 /var/www/vhosts/gemini.dev/public_html/app/components/Security.php(18): Phalcon\Di->offs in phalcon/acl/adapter/memory.zep on line 290
It's being caused by how I'm implimenting Access Control Lists at the moment. In my services.php I have:
$di->set('dispatcher', function() use ($di) {
$eventsManager = $di->getShared('eventsManager');
//Custom ACL Class
$security = new Security($di);
//Listen for events from the permission class
$eventsManager->attach('dispatch', $security);
$dispatcher = new \Phalcon\Mvc\Dispatcher();
$dispatcher->setEventsManager($eventsManager);
return $dispatcher;
});
I've read the upgrade blog and it's talking about implimenting interfaces which is all cool but I'm wondering if anyone else has hit this. I still have incubator installed from the previous version do I need to deal with that in some way. I've just done a composer update. Any tips on this would be most appreciated I'm a bit stuck at the moment. Time to learn something new!