7

I updated composer.json to remove illuminate\html and add:

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

I removed the providers/aliases from app.php for Illuminate\Html and added the replacements:

    Collective\Html\HtmlServiceProvider::class,

...

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

However when running composer update I receive the output:

$ 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 

I tried updating composer.json scripts as suggested here: https://github.com/LaravelCollective/html/issues/54

But I'm still receiving the error. Any help is greatly appreciated :)

4

1 回答 1

13

最后,我在 IRC(感谢 sisve)和这些命令的帮助下设法解决了这个问题。首先,我使用Illumination/html 回滚到一个工作站点。然后:

composer dumpautoload
composer clearcache
php artisan clear-compiled

如果clear-compiled失败,请确保没有对 Illuminate\Html 的引用bootstrap/cache/config.php并再次运行它。

删除所有对 Illuminate\Htmlconfig/app.php
illuminate/html引用composer.json

composer update

按此处所述添加 laravelcollective/html 包:http: //laravelcollective.com/docs/5.1/html#installation

composer update
于 2015-08-29T12:56:52.420 回答