Composer json提供运行时异常

时间:2014-10-31 17:37:28

标签: php laravel laravel-4 composer-php

我正在使用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 */
        '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',

        /* Additional Providers */
        'Zizaco\Confide\ConfideServiceProvider', // Confide Provider
        'Zizaco\Entrust\EntrustServiceProvider', // Entrust Provider for roles
        'Bllim\Datatables\DatatablesServiceProvider', // Datatables

        /* Uncomment for use in development */
        'Way\Generators\GeneratorsServiceProvider', // Generators
        'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider', // IDE Helpers
        'Barryvdh\Debugbar\ServiceProvider', //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'             => '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',

        /* Additional Aliases */
        'Confide'         => 'Zizaco\Confide\ConfideFacade', // Confide Alias
        'Entrust'         => 'Zizaco\Entrust\EntrustFacade', // Entrust Alias
        'String'          => 'Andrew13\Helpers\String', // String
        'Carbon'          => 'Carbon\Carbon', // Carbon
        'Datatables'      => 'Bllim\Datatables\Datatables', // DataTables

    ),

1 个答案:

答案 0 :(得分:2)

Confide包已将其服务提供商的名称从ConfideServiceProvider更改为ServiceProvider

更新您的config / app.php。替换

'Zizaco\Confide\ConfideServiceProvider',

'Zizaco\Confide\ServiceProvider',

运行composer dump-autoload,然后composer update

相关问题