Composer Message Package illuminate/html is abandoned, you should avoid using it. Use laravelcollective/html instead.

Posted on

This is an article which relates with the article mentioned about using Form class. An error generated when the ‘composer update’ command is executed. The error is specifically mentioned as the title which is ‘Package illuminate/html is abandoned, you should avoid using it. Use laravelcollective/html instead’.

This is happened in order to use Form class in a blade view template file to define a form. To use Form class, normally the illuminate/html package can be utilized to fulfill this purpose. But since the development of Laravel framework has been progressing in this context, the usage of Laravel version 5.3.0 is not applicable for the illuminate/html package. It needs another package to fill that role or position in order for the Form class to be defined. The package called ‘laravelcollective/html’. Below is the output of the command ‘composer update’ execution shown :

user@hostname:/var/www/html/testing/laravel-project$ composer update                                                         
Loading composer repositories with package information                           
Updating dependencies (including require-dev)                                    
Package operations: 1 install, 1 update, 0 removals                                                                  - Updating league/flysystem (1.0.38 => 1.0.39): Downloading (100%)         
  - Installing illuminate/html (v5.0.0): Downloading (100%)         
Package illuminate/html is abandoned, you should avoid using it. Use laravelcollective/html instead.
Writing lock file
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
Generating optimized class loader
The compiled class file has been removed.
user@hostname:/var/www/html/testing/laravel-project$ 

So, the composer utility is actually checking the compatibility of the packages installed. In this context, laravelframework which has the version of 5.3.0  is not compatible with the illuminate/html package. The packkage itself is currently abandoned which is not going for another further development.

The problem is solved by installing the necessary package named ‘laravelcollective/html’ as shown below using the help from composer utility by executing the following command :

user@hostname:/var/www/html/testing/laravel-project$ composer require "laravelcollective/html":"5.3.*"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing laravelcollective/html (v5.3.1): Downloading (100%)
Package illuminate/html is abandoned, you should avoid using it. Use laravelcollective/html instead.
Writing lock file
Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
Generating optimized class loader
The compiled class file has been removed.
user@hostname:/var/www/html/testing/laravel-project$

Based on the output of the above command execution, using the Form class will not becoming another obstacle since the necessary package has already been installed. Below is the usage of Form class displayed in the snippet code :

{{Form::open('url'=>'test/store')}}
...
{{Form::close}}

It is normally inserted in one of the blade view template file located in resources/views folder.

One thought on “Composer Message Package illuminate/html is abandoned, you should avoid using it. Use laravelcollective/html instead.

Leave a Reply