Переключение с Illuminate\Html на Collective\Html, класс «Illuminate\Html\HtmlServiceProvider» не найден

Я обновил composer.json, убрав освещение\html и добавив:

"require": {
    "laravelcollective/html": "5.1.*"

Я удалил поставщиков/псевдонимы из app.php для Illuminate\Html и добавил замены:

    Collective\Html\HtmlServiceProvider::class,

...

    'Form'      => Collective\Html\FormFacade::class,
    'Html'      => Collective\Html\HtmlFacade::class,

Однако при запуске composer update я получаю вывод:

$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing illuminate/html (v5.0.0)

- Installing laravelcollective/html (v5.1.4)
  Downloading: 100%  

Writing lock file
Generating autoload files
> php artisan clear-compiled
PHP Fatal error:  Class 'Illuminate\Html\HtmlServiceProvider' not found in vendor/laravel/framework/src/Illuminate/Foundation/Application.php on line 648

[Symfony\Component\Debug\Exception\FatalErrorException]  
Class 'Illuminate\Html\HtmlServiceProvider' not found                                                     

Script php artisan clear-compiled handling the post-update-cmd event returned with an error

[RuntimeException]                                                                   
Error Output: PHP Fatal error:  Class 'Illuminate\Html\HtmlServiceProvider' not found in vendor/laravel/framework/src/Illuminate/Foundation/Application.php on line 648 

Я попытался обновить сценарии composer.json, как предлагается здесь: https://github.com/LaravelCollective/html/issues/ 54

Но я все еще получаю сообщение об ошибке. Любая помощь приветствуется :)


person Dylan    schedule 29.08.2015    source источник


Ответы (1)


В конце концов мне удалось это исправить с помощью IRC (спасибо sisve) и этих команд. Сначала я откатился на рабочий сайт с подсветкой/html. Затем:

composer dumpautoload
composer clearcache
php artisan clear-compiled

Если clear-compiled не работает, убедитесь, что в bootstrap/cache/config.php нет ссылок на Illuminate\Html, и запустите его снова.

Удалите все ссылки на Illuminate\Html в config/app.php
Удалите требование illuminate/html в composer.json

composer update

Добавьте пакет laravelcollective/html, как описано здесь: http://laravelcollective.com/docs/5.1/html#installation

composer update
person Dylan    schedule 29.08.2015