Zend Framework 2 - BjyAuthorize Entity не был найден. в /vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/ProxyFactory.php в строке 177
Я начал проект с Zend Framework 2 и настроил модули ZfcUser и BjyAuthorize. Часть ZfcUser работает правильно, но когда я активирую BjyAuthorize, возникает ошибка
Doctrine\ORM\EntityNotFoundException: объект не найден. в /vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/ProxyFactory.php в строке 177 Стек вызовов
вот мой конфигурационный файл: - comper.json
{
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for ZF2",
"license": "BSD-3-Clause",
"keywords": [
"framework",
"zf2"
],
"homepage": "http://framework.zend.com/",
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "2.3.*",
"zf-commons/zfc-user": "dev-master",
"zendframework/zftool": "dev-master",
"doctrine/doctrine-orm-module": "0.8.0",
"gedmo/doctrine-extensions": "v2.3.9",
"zendframework/zend-developer-tools": "dev-master",
"zf-commons/zfc-user-doctrine-orm": "dev-master",
"zf-commons/zfc-admin": "dev-master",
"bjyoungblood/bjy-authorize": "1.4.0"
}
}
application.config.php
return array(
'modules' => array(
'ZendDeveloperTools',
'ZfcAdmin',
'DoctrineModule',
'DoctrineORMModule',
'ZfcBase',
'ZfcUser',
'ZfcUserDoctrineORM',
'BjyAuthorize',
'Application',
'Fountain',
'Rest',
),
'module_listener_options' => array(
'module_paths' => array(
'./module',
'./vendor',
),
'config_glob_paths' => array(
'config/autoload/{,*.}{global,local}.php',
),
),
);
bjyauthorize.global.php
return array(
'bjyauthorize' => array(
'default_role' => 'guest',
'identity_provider' => 'BjyAuthorize\Provider\Identity\ZfcUserZendDb',
'role_providers' => array(
'BjyAuthorize\Provider\Role\Config' => array(
'guest' => array(),
'user' => array('children' => array(
'admin' => array(),
)),
),
'BjyAuthorize\Provider\Role\ZendDb' => array(
'table' => 'role',
'identifier_field_name' => 'id',
'role_id_field' => 'roleId',
'parent_role_field' => 'parent_id',
),
'BjyAuthorize\Provider\Role\ObjectRepositoryProvider' => array(
'role_entity_class' => 'Fountain\Entity\Role',
'object_manager' => 'doctrine.entitymanager.orm_default',
),
),
'resource_providers' => array(
'BjyAuthorize\Provider\Resource\Config' => array(
'pants' => array(),
),
),
'rule_providers' => array(
'BjyAuthorize\Provider\Rule\Config' => array(
'allow' => array(
array(array('guest', 'user'), 'pants', 'wear')
),
'deny' => array(
// ...
),
),
),
'guards' => array(
'BjyAuthorize\Guard\Controller' => array(
array('controller' => 'index', 'action' => 'index', 'roles' => array('guest','user')),
array('controller' => 'index', 'action' => 'stuff', 'roles' => array('user')),
array(
'controller' => array('index', 'static', 'console'),
'action' => array('list', 'manage'),
'roles' => array('guest', 'admin')
),
array(
'controller' => array('search', 'administration'),
'roles' => array('staffer', 'admin')
),
array('controller' => 'zfcuser', 'roles' => array()),
),
'BjyAuthorize\Guard\Route' => array(
array('route' => 'zfcuser', 'roles' => array('user')),
array('route' => 'zfcuser/logout', 'roles' => array('user')),
array('route' => 'zfcuser/login', 'roles' => array('guest')),
array('route' => 'zfcuser/register', 'roles' => array('guest')),
// Below is the default index action used by the ZendSkeletonApplication
array('route' => 'home', 'roles' => array('guest', 'user')),
array('route' => 'home', 'roles' => array('guest', 'user', 'admin')),
array('route' => 'fountain', 'roles' => array('guest', 'user')),
array('route' => 'fountain/add', 'roles' => array( 'admin')),
array('route' => 'fountain/delete', 'roles' => array('admin')),
array('route' => 'fountain/edit', 'roles' => array('admin')),
),
),
),
);
zfcuserdoctrineorm.global.php
return array(
'doctrine' => array(
'driver' => array(
// overriding zfc-user-doctrine-orm's config
'zfcuser_entity' => array(
'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
'paths' => array( __DIR__ .'/../../module/Fountain/src/Fountain/Entity'),
),
'orm_default' => array(
'drivers' => array(
'Fountain\Entity' => 'zfcuser_entity',
),
),
),
),
'zfcuser' => array(
// telling ZfcUser to use our own class
'user_entity_class' => 'Fountain\Entity\User',
'enable_default_entities' => false,
),
);
У кого-нибудь есть представление о происхождении этой проблемы?