Laravel update via composer

1
  

[RuntimeException]
  Error Output: PHP Warning: PHP Startup: Unable to load dynamic library /usr/lib/php5/20121212+lfs/curl.so '- /usr/lib/i386-linux-gnu/libgssapi.so.3: symbol krb5_ntlm_init_get_challange, version HEIMDAL_KRB5_2.0 not defined in file libkrb5.so.26 with link time reference in Unknown on line 0
  PHP Fatal error: Class 'Collective \ Html \ HtmlServiceProvider' not found in /var/www/laravel/laravel/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 150

Does anyone know why it's giving this error, I'm a beginner with the composer, someone could explain me, because I'm trying to do what

    

asked by anonymous 04.03.2015 / 15:13

2 answers

0

The problem is when Composer downloads the updates.

Laravel includes in the Composer file some internal commands for Cache cleanup, Autoload optimization, etc.:

"scripts": {
    "post-install-cmd": [
        "php artisan clear-compiled",
        "php artisan optimize"
    ],
    "post-update-cmd": [
        "php artisan clear-compiled",
        "php artisan optimize"
    ],
    "post-create-project-cmd": [
        "php -r \"copy('.env.example', '.env');\"",
        "php artisan key:generate"
    ]
},

In the response you posted, you were missing an important step: run composer update after changing the composer.json file. Since Composer executes a Laravel command and then you entered the Service Provider Collective\Html\HtmlServiceProvider , it did not exist at the time and caused the error.

You can fix it in two ways:

  • Removing Collective\Html\HtmlServiceProvider from config\app.php and inserting again after update.

  • Updating Composer without pre and post update commands: composer update --no-scripts

  • 04.03.2015 / 15:37
    0

    In this specific case the error occurred in the /var/www/laravel/laravel/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php file after I ran the composer update, the error was at line 150, in case it was a syntax error, thanks for trying to help.

        
    05.03.2015 / 06:57