binalfew's avatar

Can't install laravelcollective/html in Laravel 5.2

Hello devs,

I have created a new laravel 5.2 project today and wanted to use the Form helpers. When I run the following command:

composer require laravelcollective/html

This is what I get:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: remove laravel/framework v5.2.0
    - Conclusion: don't install laravel/framework v5.2.0
    - laravelcollective/html v5.1.0 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.6, v5.1.8].
    - laravelcollective/html v5.1.1 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.6, v5.1.8].
    - laravelcollective/html v5.1.2 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.6, v5.1.8].
    - laravelcollective/html v5.1.3 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.6, v5.1.8].
    - laravelcollective/html v5.1.4 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.6, v5.1.8].
    - laravelcollective/html v5.1.5 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.6, v5.1.8].
    - laravelcollective/html v5.1.6 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.6, v5.1.8].
    - laravelcollective/html v5.1.7 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.6, v5.1.8].
    - laravelcollective/html v5.1.8 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.6, v5.1.8].
    - laravelcollective/html v5.1.9 requires illuminate/session 5.1.* -> satisfiable by illuminate/session[v5.1.1, v5.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.6, v5.1.8].
    - don't install illuminate/session v5.1.1|don't install laravel/framework v5.2.0
    - don't install illuminate/session v5.1.13|don't install laravel/framework v5.2.0
    - don't install illuminate/session v5.1.16|don't install laravel/framework v5.2.0
    - don't install illuminate/session v5.1.2|don't install laravel/framework v5.2.0
    - don't install illuminate/session v5.1.20|don't install laravel/framework v5.2.0
    - don't install illuminate/session v5.1.22|don't install laravel/framework v5.2.0
    - don't install illuminate/session v5.1.25|don't install laravel/framework v5.2.0
    - don't install illuminate/session v5.1.6|don't install laravel/framework v5.2.0
    - don't install illuminate/session v5.1.8|don't install laravel/framework v5.2.0
    - Installation request for laravel/framework 5.2.* -> satisfiable by laravel/framework[v5.2.0].
    - Installation request for laravelcollective/html ^5.1 -> satisfiable by laravelcollective/html[v5.1.0, v5.1.1, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9].


Installation failed, reverting ./composer.json to its original content.

Appreciate your help,

Thanks.

0 likes
13 replies
ixudra's avatar

Error message says it all really... The package hasn't been updated to comply with Laravel 5.2. You'll either have to wait until the maintainers get around to it or do it yourself and submit a pull request.

FYI: this stuff is easily googled...

binalfew's avatar

@Elimentz Thanks. Yeah the error message is descriptive. I just thought someone would lead me in the right direction to resolve it. @toby I used the dev branch as you suggested and it is working now. Thanks man.

ixudra's avatar

@binalfew Keep in mind this is a temporary fix. Using a dev branch is always dangerous because it usually contains code that is not thoroughly tested. I recommend to keep this away from production environments and to switch to master as soon as possible

binalfew's avatar

@Elimentz Sure, I just wanted to toy around with laravel 5.2. I am using 5.1 for production. Thanks a ton.

PheRum's avatar

"laravelcollective/html": "dev-master"

1 like
toby's avatar
toby
Best Answer
Level 31

@binalfew FYI: laravelcollective is now compatible w/ L5.2:

"require": {
    "laravelcollective/html": "5.2.*"
}
3 likes
matthewskinner's avatar

I'm also having issues with this and the solutions above, including -dev do not seem to work.

This is my composer.json file:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.1.*",
        "laravelcollective/html": "5.2.*"
    },
    "require-dev": {
        "fzaninotto/faker": "~1.4",
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~4.0",
        "phpspec/phpspec": "~2.1"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "App\\": "app/"
        }
    },
    "autoload-dev": {
        "classmap": [
            "tests/TestCase.php"
        ]
    },
    "scripts": {
        "post-install-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-root-package-install": [
            "php -r \"copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}

My config/app.php has the required provider and alias:

'providers' => [

        /*
         * Laravel Framework Service Providers...
         */
        Illuminate\Foundation\Providers\ArtisanServiceProvider::class,
        Illuminate\Auth\AuthServiceProvider::class,
        Illuminate\Broadcasting\BroadcastServiceProvider::class,
        Illuminate\Bus\BusServiceProvider::class,
        Illuminate\Cache\CacheServiceProvider::class,
        Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
        Illuminate\Routing\ControllerServiceProvider::class,
        Illuminate\Cookie\CookieServiceProvider::class,
        Illuminate\Database\DatabaseServiceProvider::class,
        Illuminate\Encryption\EncryptionServiceProvider::class,
        Illuminate\Filesystem\FilesystemServiceProvider::class,
        Illuminate\Foundation\Providers\FoundationServiceProvider::class,
        Illuminate\Hashing\HashServiceProvider::class,
        Illuminate\Mail\MailServiceProvider::class,
        Illuminate\Pagination\PaginationServiceProvider::class,
        Illuminate\Pipeline\PipelineServiceProvider::class,
        Illuminate\Queue\QueueServiceProvider::class,
        Illuminate\Redis\RedisServiceProvider::class,
        Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
        Illuminate\Session\SessionServiceProvider::class,
        Illuminate\Translation\TranslationServiceProvider::class,
        Illuminate\Validation\ValidationServiceProvider::class,
        Illuminate\View\ViewServiceProvider::class,
        Collective\Html\HtmlServiceProvider::class,
'aliases' => [
        'App'       => Illuminate\Support\Facades\App::class,
        'Artisan'   => Illuminate\Support\Facades\Artisan::class,
        'Auth'      => Illuminate\Support\Facades\Auth::class,
        'Blade'     => Illuminate\Support\Facades\Blade::class,
        'Bus'       => Illuminate\Support\Facades\Bus::class,
        'Cache'     => Illuminate\Support\Facades\Cache::class,
        'Config'    => Illuminate\Support\Facades\Config::class,
        'Cookie'    => Illuminate\Support\Facades\Cookie::class,
        'Crypt'     => Illuminate\Support\Facades\Crypt::class,
        'DB'        => Illuminate\Support\Facades\DB::class,
        'Eloquent'  => Illuminate\Database\Eloquent\Model::class,
        'Event'     => Illuminate\Support\Facades\Event::class,
        'File'      => Illuminate\Support\Facades\File::class,
        'Hash'      => Illuminate\Support\Facades\Hash::class,
        'Input'     => Illuminate\Support\Facades\Input::class,
        'Inspiring' => Illuminate\Foundation\Inspiring::class,
        'Lang'      => Illuminate\Support\Facades\Lang::class,
        'Log'       => Illuminate\Support\Facades\Log::class,
        'Mail'      => Illuminate\Support\Facades\Mail::class,
        'Password'  => Illuminate\Support\Facades\Password::class,
        'Queue'     => Illuminate\Support\Facades\Queue::class,
        'Redirect'  => Illuminate\Support\Facades\Redirect::class,
        'Redis'     => Illuminate\Support\Facades\Redis::class,
        'Request'   => Illuminate\Support\Facades\Request::class,
        'Response'  => Illuminate\Support\Facades\Response::class,
        'Route'     => Illuminate\Support\Facades\Route::class,
        'Schema'    => Illuminate\Support\Facades\Schema::class,
        'Session'   => Illuminate\Support\Facades\Session::class,
        'Storage'   => Illuminate\Support\Facades\Storage::class,
        'URL'       => Illuminate\Support\Facades\URL::class,
        'Validator' => Illuminate\Support\Facades\Validator::class,
        'View'      => Illuminate\Support\Facades\View::class,
        'Form'      => Collective\Html\FormFacade::class,
        'Html'      => Collective\Html\HtmlFacade::class,
],

When I run a composer update I receive this feedback but don't understand what move to make next to fix the issue:

Matthews-MacBook-Air-4:project Matthew$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Conclusion: remove laravel/framework v5.1.31
    - Conclusion: don't install laravel/framework v5.1.31
    - Conclusion: don't install laravel/framework v5.1.30
    - Conclusion: don't install laravel/framework v5.1.29
    - Conclusion: don't install laravel/framework v5.1.28
    - Conclusion: don't install laravel/framework v5.1.27
    - Conclusion: don't install laravel/framework v5.1.26
    - Conclusion: don't install laravel/framework v5.1.25
    - Conclusion: don't install laravel/framework v5.1.24
    - Conclusion: don't install laravel/framework v5.1.23
    - Conclusion: don't install laravel/framework v5.1.22
    - Conclusion: don't install laravel/framework v5.1.21
    - Conclusion: don't install laravel/framework v5.1.20
    - Conclusion: don't install laravel/framework v5.1.19
    - Conclusion: don't install laravel/framework v5.1.18
    - Conclusion: don't install laravel/framework v5.1.17
    - Conclusion: don't install laravel/framework v5.1.16
    - Conclusion: don't install laravel/framework v5.1.15
    - Conclusion: don't install laravel/framework v5.1.14
    - Conclusion: don't install laravel/framework v5.1.13
    - Conclusion: don't install laravel/framework v5.1.12
    - Conclusion: don't install laravel/framework v5.1.11
    - Conclusion: don't install laravel/framework v5.1.10
    - Conclusion: don't install laravel/framework v5.1.9
    - Conclusion: don't install laravel/framework v5.1.8
    - Conclusion: don't install laravel/framework v5.1.7
    - Conclusion: don't install laravel/framework v5.1.6
    - Conclusion: don't install laravel/framework v5.1.5
    - Conclusion: don't install laravel/framework v5.1.4
    - Conclusion: don't install laravel/framework v5.1.3
    - Conclusion: don't install laravel/framework v5.1.2
    - Conclusion: don't install laravel/framework v5.1.1
    - Conclusion: don't install laravel/framework v5.1.0
    - laravelcollective/html 5.2.x-dev requires illuminate/view 5.2.* -> satisfiable by illuminate/view[5.2.x-dev, v5.2.0, v5.2.19, v5.2.21, v5.2.6, v5.2.7].
    - laravelcollective/html v5.2 requires illuminate/view 5.2.* -> satisfiable by illuminate/view[5.2.x-dev, v5.2.0, v5.2.19, v5.2.21, v5.2.6, v5.2.7].
    - laravelcollective/html v5.2.1 requires illuminate/view 5.2.* -> satisfiable by illuminate/view[5.2.x-dev, v5.2.0, v5.2.19, v5.2.21, v5.2.6, v5.2.7].
    - laravelcollective/html v5.2.2 requires illuminate/view 5.2.* -> satisfiable by illuminate/view[5.2.x-dev, v5.2.0, v5.2.19, v5.2.21, v5.2.6, v5.2.7].
    - laravelcollective/html v5.2.3 requires illuminate/view 5.2.* -> satisfiable by illuminate/view[5.2.x-dev, v5.2.0, v5.2.19, v5.2.21, v5.2.6, v5.2.7].
    - laravelcollective/html v5.2.4 requires illuminate/view 5.2.* -> satisfiable by illuminate/view[5.2.x-dev, v5.2.0, v5.2.19, v5.2.21, v5.2.6, v5.2.7].
    - don't install illuminate/view 5.2.x-dev|don't install laravel/framework 5.1.x-dev
    - don't install illuminate/view v5.2.0|don't install laravel/framework 5.1.x-dev
    - don't install illuminate/view v5.2.19|don't install laravel/framework 5.1.x-dev
    - don't install illuminate/view v5.2.21|don't install laravel/framework 5.1.x-dev
    - don't install illuminate/view v5.2.6|don't install laravel/framework 5.1.x-dev
    - don't install illuminate/view v5.2.7|don't install laravel/framework 5.1.x-dev
    - Installation request for laravel/framework 5.1.* -> satisfiable by laravel/framework[5.1.x-dev, v5.1.0, v5.1.1, v5.1.10, v5.1.11, v5.1.12, v5.1.13, v5.1.14, v5.1.15, v5.1.16, v5.1.17, v5.1.18, v5.1.19, v5.1.2, v5.1.20, v5.1.21, v5.1.22, v5.1.23, v5.1.24, v5.1.25, v5.1.26, v5.1.27, v5.1.28, v5.1.29, v5.1.3, v5.1.30, v5.1.31, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9].
    - Installation request for laravelcollective/html 5.2.* -> satisfiable by laravelcollective/html[5.2.x-dev, v5.2, v5.2.1, v5.2.2, v5.2.3, v5.2.4].

I have tried installing other versions of laravelcollective/html but the same error or different errors appear.

Thank you in advance!

edan's avatar

@matthewskinner ... hye there... i had this problem but im successfully install this by execute this below command..in terminal

composer require laravelcollective/html 5.2.*

let me know if anything wrong.. thank you.. and the concern is the version that you asking it might be not match with provider... thank you.

jolethpogi's avatar

@toby where should I put this statement "require": { "laravelcollective/html": "5.2.*" }

toby's avatar

It's a composer dependency, so you can either put it in your composer.json file and run composer install on the cli or you can add the dependency directly via the command line: composer require "laravelcollective/html:5.2.*" which will download the files and update your composer.json :)

Please or to participate in this conversation.