3

I kept on getting this error after running composer update

./composer.json has been updated
> php artisan clear-compiled

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

Script php artisan clear-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-autoloader] [--no-scripts] [--no-
progress] [--with-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader]
 [-a|--classmap-authoritative] [--ignore-platform-reqs] [--prefer-stable] [--pre
fer-lowest] [packages1] ... [packagesN]

In composer.json this is my require section:

"require": {
    "php": ">=5.5.9",
    "laravel/framework": "5.1.*",
    "laravelcollective/html": "dev-master"    
},

What exactly is the problem?

andrewtweber
  • 24,520
  • 22
  • 88
  • 110
ken4ward
  • 2,246
  • 5
  • 49
  • 89
  • 1
    Try this solution [Laravel 5 Failed opening required bootstrap/../vendor/autoload.php](http://stackoverflow.com/a/36395204/2365052) – Shubhamoy Apr 04 '16 at 05:37

1 Answers1

1

Could you post your entire composer.json file ?

It should contain something like this:

pre-update-cmd: [


]

And within that array there is some command or script that is throwing an exception. Composer allows you to run scripts using hooks at various points during the installation or update of all Composer packages in your application. https://getcomposer.org/doc/articles/scripts.md

It Also looks like you need to add this to your require section:

"illuminate/html": "~5.0"

Don't forget to add the Façade / aliases for Html if you intend to use it in your templates.

in config/app.php in the providers array

'Form'      => Illuminate\Html\FormFacade::class
'Html'      => Illuminate\Html\HtmlFacade::class,
funkenstein
  • 293
  • 6
  • 17