2016-07-06 2 views
1

Проблемыпоставщиков услуг L5 не загружая

Любовь L5. Но последние 24 часа были кошмаром. Ни один из моих сторонних поставщиков услуг (SP) не загружается. Я сделал чистую установку L5 и попытался добавить SP, но все еще не работал.

SPs устанавливается как следует в папке vendor при запуске composer update. Но при запуске L5 я получаю сообщение об ошибке Class 'LaravelLocalization' not found

composer.json

"require": { 
    "php": ">=5.5.9", 
    "laravel/framework": "5.2.*", 
    "twbs/bootstrap": "*", 
    "intervention/image": "*", 
    "laravelcollective/html": "*", 
    "barryvdh/laravel-debugbar": "*", 
    "davibennun/laravel-push-notification": "dev-laravel5", 
    "mcamara/laravel-localization": "1.1.*", 
    "tijsverkoyen/css-to-inline-styles": "1.5.5", 
    "league/csv": "*" 
}, 

App.config

провайдеры

/* 
    * 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, 
    Collective\Html\HtmlServiceProvider::class, 

    /* 
    * Application Service Providers... 
    */ 
    App\Providers\AppServiceProvider::class, 
    App\Providers\AuthServiceProvider::class, 
    App\Providers\EventServiceProvider::class, 
    App\Providers\RouteServiceProvider::class, 

    /* 
    * 3rd Party Service Providers... 
    */ 
    Barryvdh\Debugbar\ServiceProvider::class, 
    Intervention\Image\ImageServiceProvider::class, 
    Davibennun\LaravelPushNotification\LaravelPushNotificationServiceProvider::class, 
    Mcamara\LaravelLocalization\LaravelLocalizationServiceProvider::class 

алиасами

'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'  => Collective\Html\FormFacade::class, 
    'Html'  => Collective\Html\HtmlFacade::class, 
    'Debugbar' => Barryvdh\Debugbar\Facade::class, 
    'Image'  => Intervention\Image\Facades\Image::class, 
    'PushNotification' => Davibennun\LaravelPushNotification\Facades\PushNotification::class, 
    'LaravelLocalization' => Mcamara\LaravelLocalization\Facades\LaravelLocalization::class 

Вещи, которые я пытался

Laravel 5.2 Service provider not booting

php artisan clear-compiled composer dump-autoload php artisan optimize

Laravel - Composer unable to find the service provider class

composer clear

Я также обгорел в Интернете, но придумал сухую .. :(https://laracasts.com/discuss/channels/general-discussion/laravel-5-package-serviceprovider-cant-be-found)

Идеи?

Любые идеи, как преодолеть, очень ценятся. Не удается запустить приложение теперь и потерял день работы ..:/

UPDATE

autoload_files.php в vendor/composer не содержит некоторые рамки. barryvdh/laravel-debugbar является его частью (не загружается), но, например, Mcamara\LaravelLocalization НЕ является частью файла autoload_files.

Но Mcamara\LaravelLocalization является частью autoload_static.php под $prefixesPsr0 - если это помогает?

autoload_files.php (в/поставщика/композитор /)

return array(
    '1d1b89d124cc9cb8219922c9d5569199' => $vendorDir . '/hamcrest/hamcrest-php/hamcrest/Hamcrest.php', 
    '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', 
    '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', 
    'bd9634f2d41831496de0d3dfe4c94881' => $vendorDir . '/symfony/polyfill-php56/bootstrap.php', 
    '2c102faa651ef8ea5874edb585946bce' => $vendorDir . '/swiftmailer/swiftmailer/lib/swift_required.php', 
    'e7223560d890eab89cda23685e711e2c' => $vendorDir . '/psy/psysh/src/Psy/functions.php', 
    '5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php', 
    'f0906e6318348a765ffb6eb24e0d0938' => $vendorDir . '/laravel/framework/src/Illuminate/Foundation/helpers.php', 
    '58571171fd5812e6e447dce228f52f4d' => $vendorDir . '/laravel/framework/src/Illuminate/Support/helpers.php', 
    'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', 
    'f18cc91337d49233e5754e93f3ed9ec3' => $vendorDir . '/laravelcollective/html/src/helpers.php', 
    '4a1f389d6ce373bda9e57857d3b61c84' => $vendorDir . '/barryvdh/laravel-debugbar/src/helpers.php', 

);

РЕШЕНИЕ

ТРЕТИЙ чистую установку L5, где я добавить в SPs один за другим, кажется, работает. Просто счастлив вернуться на правильный путь.Не могу поблагодарить всех достаточно - большой крик @MikeBarwick, который обеспечил хорошее руководство повсюду - СПАСИБО! :)

+0

чистой установки и 'композитор update'? Это определенно не очень хорошая комбинация. Обновление Composer просто устанавливает библиотеки в файле composer.lock. Вы пытались запустить 'comper install'? –

+0

если вы выберете LaravelLocalization и сохраните остальные 3, это сработает или перейдет в другой класс? Который из? –

+0

Вы можете видеть список команд, если вы запускаете только 'php artisan'? Попробуйте с помощью 'composer update -no-scripts' в случае, а затем' composer update' снова. – phaberest

ответ

0

Попробуйте это:

composer dump-autoload --optimize 
+0

Спасибо Alfredo - но до сих пор нет радости: / –

Смежные вопросы