Confide包已将其服务提供商的名称从
我正在使用laravel 4
,当运行composer update
时,我得到以下异常:
$ composer update
{"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","me
ssage":"Class 'Zizaco\Confide\ConfideServiceProvider' not found","file":"C:\x
ampp\htdocs\laravel_project\lara\vendor\laravel\framework\src\I
lluminate\Foundation\ProviderRepository.php","line":157}}Script php artisan cl
ear-compiled handling the pre-update-cmd event returned with an error
[RuntimeException]
Error Output:
update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock]
[--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-
dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [
packagesN]
这是我的composer
文件
{
"name": "andrew13/Laravel-4-Bootstrap-Starter-Site",
"description": "Laravel 4 Starter Site",
"keywords": ["laravel", "Starter Site"],
"license": "MIT",
"require": {
"laravel/framework": "~4.2",
"zizaco/confide": "~4.0@dev",
"zizaco/entrust": "1.2.*@dev",
"bllim/datatables": "~1.3",
"fzaninotto/faker": "1.3.*@dev",
"barryvdh/laravel-debugbar": "~1.7"
},
"require-dev": {
"way/generators": "~2.6",
"phpunit/phpunit": "~4.0",
"mockery/mockery": "~0.9",
"summerstreet/woodling": "~0.1.6",
"barryvdh/laravel-ide-helper": "~1.11"
},
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/library",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/library",
"app/controllers/admin",
"app/controllers/user"
]
},
"scripts": {
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-install-cmd": [
"php artisan optimize"
],
"post-update-cmd": [
"php artisan optimize"
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-update-cmd":[
"php artisan ide-helper:generate"
]
},
"config": {
"preferred-install": "dist"
}
}
有什么建议我做错了什么?
更新
$ php artisan clear-compiled
{"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","me
ssage":"Class 'Zizaco\Confide\ConfideServiceProvider' not found","file":"C:\x
ampp\htdocs\laravel_project\lara\vendor\laravel\framework\src\I
lluminate\Foundation\ProviderRepository.php","line":157}}
更新2
User@User-PC /c/xampp/htdocs/laravel_project/lara(master)
$ composer dump-autoload
Generating autoload files
User@User-PC /c/xampp/htdocs/laravel_project/lara(master)
$ php artisan clear-compiled
{"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","me
ssage":"Class 'Zizaco\Confide\ConfideServiceProvider' not found","file":"C:\x
ampp\htdocs\laravel_project\lara-scrapper\vendor\laravel\framework\src\I
lluminate\Foundation\ProviderRepository.php","line":157}}
更新3
'providers' => array(
/* Laravel Base Providers */
'IlluminateFoundationProvidersArtisanServiceProvider',
'IlluminateAuthAuthServiceProvider',
'IlluminateCacheCacheServiceProvider',
'IlluminateSessionCommandsServiceProvider',
'IlluminateFoundationProvidersConsoleSupportServiceProvider',
'IlluminateRoutingControllerServiceProvider',
'IlluminateCookieCookieServiceProvider',
'IlluminateDatabaseDatabaseServiceProvider',
'IlluminateEncryptionEncryptionServiceProvider',
'IlluminateFilesystemFilesystemServiceProvider',
'IlluminateHashingHashServiceProvider',
'IlluminateHtmlHtmlServiceProvider',
'IlluminateLogLogServiceProvider',
'IlluminateMailMailServiceProvider',
'IlluminateDatabaseMigrationServiceProvider',
'IlluminatePaginationPaginationServiceProvider',
'IlluminateQueueQueueServiceProvider',
'IlluminateRedisRedisServiceProvider',
'IlluminateRemoteRemoteServiceProvider',
'IlluminateAuthRemindersReminderServiceProvider',
'IlluminateDatabaseSeedServiceProvider',
'IlluminateSessionSessionServiceProvider',
'IlluminateTranslationTranslationServiceProvider',
'IlluminateValidationValidationServiceProvider',
'IlluminateViewViewServiceProvider',
'IlluminateWorkbenchWorkbenchServiceProvider',
/* Additional Providers */
'ZizacoConfideConfideServiceProvider', // Confide Provider
'ZizacoEntrustEntrustServiceProvider', // Entrust Provider for roles
'BllimDatatablesDatatablesServiceProvider', // Datatables
/* Uncomment for use in development */
'WayGeneratorsGeneratorsServiceProvider', // Generators
'BarryvdhLaravelIdeHelperIdeHelperServiceProvider', // IDE Helpers
'BarryvdhDebugbarServiceProvider', //Debugbar
),
/*
|--------------------------------------------------------------------------
| Service Provider Manifest
|--------------------------------------------------------------------------
|
| The service provider manifest is used by Laravel to lazy load service
| providers which are not needed for each request, as well to keep a
| list of all of the services. Here, you may set its storage spot.
|
*/
'manifest' => storage_path() . '/meta',
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don't hinder performance.
|
*/
'aliases' => array(
/* Laravel Base Aliases */
'App' => 'IlluminateSupportFacadesApp',
'Artisan' => 'IlluminateSupportFacadesArtisan',
'Auth' => 'IlluminateSupportFacadesAuth',
'Blade' => 'IlluminateSupportFacadesBlade',
'Cache' => 'IlluminateSupportFacadesCache',
'ClassLoader' => 'IlluminateSupportClassLoader',
'Config' => 'IlluminateSupportFacadesConfig',
'Controller' => 'IlluminateRoutingController',
'Cookie' => 'IlluminateSupportFacadesCookie',
'Crypt' => 'IlluminateSupportFacadesCrypt',
'DB' => 'IlluminateSupportFacadesDB',
'Eloquent' => 'IlluminateDatabaseEloquentModel',
'Event' => 'IlluminateSupportFacadesEvent',
'File' => 'IlluminateSupportFacadesFile',
'Form' => 'IlluminateSupportFacadesForm',
'Hash' => 'IlluminateSupportFacadesHash',
'HTML' => 'IlluminateSupportFacadesHTML',
'Input' => 'IlluminateSupportFacadesInput',
'Lang' => 'IlluminateSupportFacadesLang',
'Log' => 'IlluminateSupportFacadesLog',
'Mail' => 'IlluminateSupportFacadesMail',
'Paginator' => 'IlluminateSupportFacadesPaginator',
'Password' => 'IlluminateSupportFacadesPassword',
'Queue' => 'IlluminateSupportFacadesQueue',
'Redirect' => 'IlluminateSupportFacadesRedirect',
'Redis' => 'IlluminateSupportFacadesRedis',
'Request' => 'IlluminateSupportFacadesRequest',
'Response' => 'IlluminateSupportFacadesResponse',
'Route' => 'IlluminateSupportFacadesRoute',
'Schema' => 'IlluminateSupportFacadesSchema',
'Seeder' => 'IlluminateDatabaseSeeder',
'Session' => 'IlluminateSupportFacadesSession',
'SoftDeletingTrait' => 'IlluminateDatabaseEloquentSoftDeletingTrait',
'SSH' => 'IlluminateSupportFacadesSSH',
'Str' => 'IlluminateSupportStr',
'URL' => 'IlluminateSupportFacadesURL',
'Validator' => 'IlluminateSupportFacadesValidator',
'View' => 'IlluminateSupportFacadesView',
/* Additional Aliases */
'Confide' => 'ZizacoConfideConfideFacade', // Confide Alias
'Entrust' => 'ZizacoEntrustEntrustFacade', // Entrust Alias
'String' => 'Andrew13HelpersString', // String
'Carbon' => 'CarbonCarbon', // Carbon
'Datatables' => 'BllimDatatablesDatatables', // DataTables
),
ConfideServiceProvider
更改为ServiceProvider
。
更新config/app.php。替换行
'ZizacoConfideConfideServiceProvider',
带有
'ZizacoConfideServiceProvider',
运行composer dump-autoload
,然后运行composer update