My make up a project by laravel4.2;
(1)first,I install the "edvinaskrucas/notification"
in my composer.json in the require-line like this:
"require": {
"laravel/framework": "4.2.*",
"cartalyst/sentry":"2.1.4",
"fzaninotto/faker":"1.5.*#dev",
"edvinaskrucas/notification": "4.0.0"
},
(2)second, I join two lines codes into my laravel config file config/app.php below each last line like this :
'providers' => array(
'Illuminate\Foundation\Providers\ArtisanServiceProvider',
'Illuminate\Auth\AuthServiceProvider',
'Illuminate\Cache\CacheServiceProvider',
'Illuminate\Session\CommandsServiceProvider',
'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider',
'Illuminate\Routing\ControllerServiceProvider',
'Illuminate\Cookie\CookieServiceProvider',
'Illuminate\Database\DatabaseServiceProvider',
'Illuminate\Encryption\EncryptionServiceProvider',
'Illuminate\Filesystem\FilesystemServiceProvider',
'Illuminate\Hashing\HashServiceProvider',
'Illuminate\Html\HtmlServiceProvider',
'Illuminate\Log\LogServiceProvider',
'Illuminate\Mail\MailServiceProvider',
'Illuminate\Database\MigrationServiceProvider',
'Illuminate\Pagination\PaginationServiceProvider',
'Illuminate\Queue\QueueServiceProvider',
'Illuminate\Redis\RedisServiceProvider',
'Illuminate\Remote\RemoteServiceProvider',
'Illuminate\Auth\Reminders\ReminderServiceProvider',
'Illuminate\Database\SeedServiceProvider',
'Illuminate\Session\SessionServiceProvider',
'Illuminate\Translation\TranslationServiceProvider',
'Illuminate\Validation\ValidationServiceProvider',
'Illuminate\View\ViewServiceProvider',
'Illuminate\Workbench\WorkbenchServiceProvider',
'Way\Generators\GeneratorsServiceProvider',
'Cartalyst\Sentry\SentryServiceProvider',
'Krucas\Notification\NotificationServiceProvider' ***--this new join in***
),
'aliases' => array(
'App' => 'Illuminate\Support\Facades\App',
'Artisan' => 'Illuminate\Support\Facades\Artisan',
'Auth' => 'Illuminate\Support\Facades\Auth',
'Blade' => 'Illuminate\Support\Facades\Blade',
'Cache' => 'Illuminate\Support\Facades\Cache',
'ClassLoader' => 'Illuminate\Support\ClassLoader',
'Config' => 'Illuminate\Support\Facades\Config',
'Controller' => 'Illuminate\Routing\Controller',
'Cookie' => 'Illuminate\Support\Facades\Cookie',
'Crypt' => 'Illuminate\Support\Facades\Crypt',
'DB' => 'Illuminate\Support\Facades\DB',
'Eloquent' => 'Illuminate\Database\Eloquent\Model',
'Event' => 'Illuminate\Support\Facades\Event',
'File' => 'Illuminate\Support\Facades\File',
'Form' => 'Illuminate\Support\Facades\Form',
'Hash' => 'Illuminate\Support\Facades\Hash',
'HTML' => 'Illuminate\Support\Facades\HTML',
'Input' => 'Illuminate\Support\Facades\Input',
'Lang' => 'Illuminate\Support\Facades\Lang',
'Log' => 'Illuminate\Support\Facades\Log',
'Mail' => 'Illuminate\Support\Facades\Mail',
'Paginator' => 'Illuminate\Support\Facades\Paginator',
'Password' => 'Illuminate\Support\Facades\Password',
'Queue' => 'Illuminate\Support\Facades\Queue',
'Redirect' => 'Illuminate\Support\Facades\Redirect',
'Redis' => 'Illuminate\Support\Facades\Redis',
'Request' => 'Illuminate\Support\Facades\Request',
'Response' => 'Illuminate\Support\Facades\Response',
'Route' => 'Illuminate\Support\Facades\Route',
'Schema' => 'Illuminate\Support\Facades\Schema',
'Seeder' => 'Illuminate\Database\Seeder',
'Session' => 'Illuminate\Support\Facades\Session',
'SoftDeletingTrait' => 'Illuminate\Database\Eloquent\SoftDeletingTrait',
'SSH' => 'Illuminate\Support\Facades\SSH',
'Str' => 'Illuminate\Support\Str',
'URL' => 'Illuminate\Support\Facades\URL',
'Validator' => 'Illuminate\Support\Facades\Validator',
'View' => 'Illuminate\Support\Facades\View',
'Sentry' => 'Cartalyst\Sentry\Facades\Laravel\Sentry',
'Notification' => 'Krucas\Notification\Facades\Notification' ***-->and this new***
),
(3) when i refresh the firefox after "dump-autoload the composer.json", then comes my question:
it says :
Symfony \ Component \ Debug \ Exception \ FatalErrorException (E_ERROR)
Class 'Krucas\Notification\NotificationServiceProvider' not found!
What can I do to resolve this problem? Hope someone who sees this can help me.
To actually install a package you have to run composer update after adding it to composer.json.
composer update will detect the package added to composer.json and download the source.
Comment those two "joins" and do a composer dump-autoload and after uncomment those lines
Related
After deploy Magento 2 Translation Extension by Magefan i got following error
{"0":"Warning: class_implements(): Class TranslationGridDataProvider does not exist and could not be loaded in \/home\/419982.cloudwaysapps.com\/vftydjkdjd\/public_html\/vendor\/magento\/framework\/Code\/Reader\/ClassReader.php on line 71","1":"<pre>#1 class_implements('TranslationGridD...') called at [vendor\/magento\/framework\/Code\/Reader\/ClassReader.php:71]\n#2 Magento\\Framework\\Code\\Reader\\ClassReader->getParents('TranslationGridD...') called at [vendor\/magento\/framework\/View\/Element\/UiComponent\/Argument\/Interpreter\/ConfigurableObject.php:118]\n#3 Magento\\Framework\\View\\Element\\UiComponent\\Argument\\Interpreter\\ConfigurableObject->getParents('TranslationGridD...') called at [vendor\/magento\/framework\/View\/Element\/UiComponent\/Argument\/Interpreter\/ConfigurableObject.php:96]\n#4 Magento\\Framework\\View\\Element\\UiComponent\\Argument\\Interpreter\\ConfigurableObject->evaluate(array('name' => 'dataProvider', 'argument' => array('class' => array('name' => 'class', 'xsi:type' => 'string', 'value' => 'TranslationGridD...'), 'name' => array('name' => 'name', 'xsi:type' => 'string', 'value' => 'translation_tran...'), 'primaryFieldName' => array('name' => 'primaryFieldName', 'xsi:type' => 'string', 'value' => 'key_id'), 'requestFieldName' => array('name' => 'requestFieldName', 'xsi:type' => 'string', 'value' => 'id'), 'data' => array('name' => 'data', 'xsi:type' => 'array', 'item' => array('config' => array('name' => 'config', 'xsi:type' => 'array', 'item' => array('component' => array('name' => 'component', 'xsi:type' => 'string', 'value' => 'Magento_Ui\/js\/gr...'), 'update_url' => array('name' => 'update_url', 'xsi:type' => 'url', 'path' => 'mui\/index\/render'), 'storageConfig' => array('name' => 'storageConfig', 'xsi:type' => 'array', 'item' => array('indexField' => array('name' => 'indexField', 'xsi:type' => 'string', 'value' => 'key_id')))))))))) called at [generated\/code\/Magento\/Framework\/Data\/Argument\/InterpreterInterface\/Proxy.php:95]\n#5 Magento\\Framework\\Data\\Argument\\InterpreterInterface\\Proxy->evaluate(array('name' => 'dataProvider', 'argument' => array('class' => array('name' => 'class', 'xsi:type' => 'string', 'value' => 'TranslationGridD...'), 'name' => array('name' => 'name', 'xsi:type' => 'string', 'value' => 'translation_tran...'), 'primaryFieldName' => array('name' => 'primaryFieldName', 'xsi:type' => 'string', 'value' => 'key_id'), 'requestFieldName' => array('name' => 'requestFieldName', 'xsi:type' => 'string', 'value' => 'id'), 'data' => array('name' => 'data', 'xsi:type' => 'array', 'item' => array('config' => array('name' => 'config', 'xsi:type' => 'array', 'item' => array('component' => array('name' => 'component', 'xsi:type' => 'string', 'value' => 'Magento_Ui\/js\/gr...'), 'update_url' => array('name' => 'update_url', 'xsi:type' => 'url', 'path' => 'mui\/index\/render'), 'storageConfig' => array('name' => 'storageConfig', 'xsi:type' => 'array', 'item' => array('indexField' => array('name' => 'indexField', 'xsi:type' => 'string', 'value' => 'key_id')))))))))) called at [vendor\/magento\/framework\/Data\/Argument\/Interpreter\/Composite.php:61]\n#6 Magento\\Framework\\Data\\Argument\\Interpreter\\Composite->evaluate(array('name' => 'dataProvider', 'argument' => array('class' => array('name' => 'class', 'xsi:type' => 'string', 'value' => 'TranslationGridD...'), 'name' => array('name' => 'name', 'xsi:type' => 'string', 'value' => 'translation_tran...'), 'primaryFieldName' => array('name' => 'primaryFieldName', 'xsi:type' => 'string', 'value' => 'key_id'), 'requestFieldName' => array('name' => 'requestFieldName', 'xsi:type' => 'string', 'value' => 'id'), 'data' => array('name' => 'data', 'xsi:type' => 'array', 'item' => array('config' => array('name' => 'config', 'xsi:type' => 'array', 'item' => array('component' => array('name' => 'component', 'xsi:type' => 'string', 'value' => 'Magento_Ui\/js\/gr...'), 'update_url' => array('name' => 'update_url', 'xsi:type' => 'url', 'path' => 'mui\/index\/render'), 'storageConfig' => array('name' => 'storageConfig', 'xsi:type' => 'array', 'item' => array('indexField' => array('name' => 'indexField', 'xsi:type' => 'string', 'value' => 'key_id')))))))))) called at [vendor\/magento\/module-ui\/Config\/Data.php:164]\n#7 Magento\\Ui\\Config\\Data-
Please make sure that when installing Magento 2 Translation Extension you followed the installation instructions, especially the step
php bin/magento setup:di:compile
I add the barryvdh/laravel-ide-helper plugin into PhpStorm 2017.3.4 for Laravel 5.6. It seems that it does not work properly.
routes/api.php
Route::middleware('auth:api')->get('/user', function (Request $request) {
return $request->user();
});
Method 'middleware' not found in Route
routes/web.php
Route::get('/', function () {
return view('welcome');
});
This one is ok
routes/channels.php
Broadcast::channel('App.User.{id}', function ($user, $id) {
return (int) $user->id === (int) $id;
});
Method 'channel' not found in Broadcast
App\Http\Controllers\Auth\RegisterController.php
protected function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|string|max:255',
'email' => 'required|string|email|max:255|unique:users',
'password' => 'required|string|min:6|confirmed',
]);
}
Multiple definitions exist for class Validator
config/app.php
'aliases' => [
'App' => Illuminate\Support\Facades\App::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Broadcast' => Illuminate\Support\Facades\Broadcast::class,
'Bus' => Illuminate\Support\Facades\Bus::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class,
'DB' => Illuminate\Support\Facades\DB::class,
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
'Event' => Illuminate\Support\Facades\Event::class,
'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class,
'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class,
'Notification' => Illuminate\Support\Facades\Notification::class,
'Password' => Illuminate\Support\Facades\Password::class,
'Queue' => Illuminate\Support\Facades\Queue::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class,
'Redis' => Illuminate\Support\Facades\Redis::class,
'Request' => Illuminate\Support\Facades\Request::class,
'Response' => Illuminate\Support\Facades\Response::class,
'Route' => Illuminate\Support\Facades\Route::class,
'Schema' => Illuminate\Support\Facades\Schema::class,
'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
'Debugbar' => Barryvdh\Debugbar\Facade::class,
],
Multiple definitions exist for class App.Multiple definitions exist for class Artisan. All lines show these info.
What should I do? I just begin to learn to use Laravel.
You need to run the following artisan commands:
php artisan ide-helper:generate
php artisan ide-helper:models
php artisan ide-helper:meta
In fact I recommend to include it in the post-update-cmd part of your composer.json file so it runs these commands automatically everytime your do composer update
"post-update-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
"#php artisan ide-helper:generate --tenant=tda",
"#php artisan ide-helper:meta --tenant=tda",
"#php artisan horizon:publish --ansi --tenant=tda",
]
I am using laravel 5.2 and I am getting following error
FatalErrorException in HtmlServiceProvider.php line 36:
Call to undefined method Illuminate\Foundation\Application::bindShared()
my app.php file is
<?php
return [
'env' => env('APP_ENV', 'production'),
'debug' => env('APP_DEBUG', false),
'url' => 'http://localhost',
'timezone' => 'UTC',
'locale' => 'en',
'fallback_locale' => 'en',
'key' => env('APP_KEY'),
'cipher' => 'AES-256-CBC',
'log' => env('APP_LOG', 'single'),
'providers' => [
/*
* Laravel Framework Service Providers...
*/
Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class,
Illuminate\Cache\CacheServiceProvider::class,
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
Illuminate\Cookie\CookieServiceProvider::class,
Illuminate\Database\DatabaseServiceProvider::class,
Illuminate\Encryption\EncryptionServiceProvider::class,
Illuminate\Filesystem\FilesystemServiceProvider::class,
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
Illuminate\Hashing\HashServiceProvider::class,
Illuminate\Mail\MailServiceProvider::class,
Illuminate\Pagination\PaginationServiceProvider::class,
Illuminate\Pipeline\PipelineServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class,
Illuminate\Redis\RedisServiceProvider::class,
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class,
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
'Illuminate\Html\HtmlServiceProvider',
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
],
'aliases' => [
'App' => Illuminate\Support\Facades\App::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class,
'DB' => Illuminate\Support\Facades\DB::class,
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
'Event' => Illuminate\Support\Facades\Event::class,
'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class,
'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class,
'Password' => Illuminate\Support\Facades\Password::class,
'Queue' => Illuminate\Support\Facades\Queue::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class,
'Redis' => Illuminate\Support\Facades\Redis::class,
'Request' => Illuminate\Support\Facades\Request::class,
'Response' => Illuminate\Support\Facades\Response::class,
'Route' => Illuminate\Support\Facades\Route::class,
'Schema' => Illuminate\Support\Facades\Schema::class,
'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
'Form' => 'Illuminate\Html\FormFacade',
'Html' => 'Illuminate\Html\HtmlFacade',
],
];
And signup_form.blade.php file is
<h1>signupform</h1>
<div class="signup-form">
{!! Form::open() !!}
{!! Form::text('email','',array('class'=>'email','id'=>"email","placeholder"=>'Email address'))!!}
{!! Form::close() !!}
</div>
And my routes.php file
<?php
Route::get('/', function () {
return view('welcome');
});
Route::get('home', function () {
echo 'welome home';
});
Route::get('signup', 'Auth\HomeController#signupform');
whenever i open the form in browser it shows the above error.
You need to remove:
'Illuminate\Html\HtmlServiceProvider',
and
'Form' => 'Illuminate\Html\FormFacade',
'Html' => 'Illuminate\Html\HtmlFacade',
form your `config/app.php
then remove from your composer.json illuminate/html then add to your composer.json:
"laravelcollective/html": "5.*"
in require section
then run composer install
And further you need to follow instructions for https://laravelcollective.com/docs/5.1/html#installation to complete this package installation
EDIT IT might be not working at this moment because of this: https://github.com/LaravelCollective/html/issues/133 - it will be probably solved after merging this PR: https://github.com/illuminate/html/pull/31/files
First, in the composer.json file need to replace:
"illuminate/html": "^5.0"
with
"laravelcollective/html":"5.2.*"
Next you need update the composer from the terminal by typing this command in your terminal: composer update.
Next, in the config/app.php file, you replace the:
'Illuminate\Html\HtmlServiceProvider::class'`
with
'Collective\Html\HtmlServiceProvider::class'
Next you replace these two classes aliases:
'Form' => Illuminate\Html\FormFacade::class,
'Html' => Illuminate\Html\HtmlFacade::class,
with
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
Lastly, you need to update your routes.php file by replacing the 'web' middleware with:
Route::group(['middleware' => ['web']], function () use ($router) {
$router->resource('blogs', 'BlogsController');
});
Here's a tutorial on LaravelCollective.com.
The "trick" that worked for me is the one mentioned above because Illuminate/HTML package has been deprecated:
Use:laravelcollective/html
https://stackoverflow.com/a/34991188/3327198
In the terminal (CLI): composer require laravelcollective/html
Add this lines in config/app.php
IN PROVIDERS GROUP:
Collective\Html\HtmlServiceProvider::class,
IN ALIASES GROUP:
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
This trick worked for me
Change the name of all "bindShared" functions into "singleton" in the vendor\illuminate\html\HtmlServiceProvider.php file
For example:
Change
$this->app->bindShared('html', function($app)
{
return new HtmlBuilder($app['url']);
});
into
$this->app->singleton('html', function($app)
{
return new HtmlBuilder($app['url']);
});
I'm creating an authentication module to deal with the login/logout of users into the website.
I want to keep the paths simple:
https://example.com/login
https://example.com/logout
But, for some functions within the application/module, it would make sense to me to set up the two routes under some kind of parent:
'routes' => array(
'auth' => array(
'type' => 'Literal',
'options' => array(
'route' => '',
),
'may_terminate' => true,
'child_routes' => array(
'login' => array(
'type' => 'Literal',
'options' => array(
'route' => '/login',
'defaults' => array(
'controller' => 'Base\Controller\Authentication',
'action' => 'login',
),
),
'may_terminate' => true,
),
'logout' => array(
'type' => 'Literal',
'options' => array(
'route' => '/logout',
'defaults' => array(
'controller' => 'Base\Controller\Authentication',
'action' => 'logout',
),
),
'may_terminate' => true,
),
),
),
The problem is - without any route in the parent, I can't get a match on either of the child routes (/login and /logout return 404 with routing errors).
If I do put a route in the parent, like /auth then the urls only match as /auth/login and /auth/logout.
I don't want the parent to interfere with routing in other modules - for example, the "home" route at '/' is already defined in a different module and I don't want to replace or modify that.
About the only thing I have found on the internet similar to what I'm trying is a resolved bug report from 2012.
Is there a way to define a non-routing parent that can hold routable children in ZF2 configuration?
'routes' => array(
'auth' => array(
'type' => 'Literal',
'options' => array(
'route' => '/',
),
'may_terminate' => true,
'child_routes' => array(
'login' => array(
'type' => 'Literal',
'options' => array(
'route' => 'login',
'defaults' => array(
'controller' => 'Base\Controller\Authentication',
'action' => 'login',
),
),
'may_terminate' => true,
),
'logout' => array(
'type' => 'Literal',
'options' => array(
'route' => 'logout',
'defaults' => array(
'controller' => 'Base\Controller\Authentication',
'action' => 'logout',
),
),
'may_terminate' => true,
),
),
),
I started a project with Zend Framework 2 and I set up the modules ZfcUser and BjyAuthorize.
The ZfcUser part works correctly but when I active BjyAuthorize an error occurs
Doctrine\ORM\EntityNotFoundException: Entity was not found. in /vendor/doctrine/orm/lib/Doctrine/ORM/Proxy/ProxyFactory.php on line 177
Call Stack
here is my config file :
- 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,
),
);
Anyone have an idea of the origin of this problem?