1

I'm testing Laravel Framework new 5.1 version.

And I want to install famous barryvdh/laravel-ide-helper package.

A know that the problem is: barryvdh/laravel-ide-helper require illuminate/filesystem: 5.0.x and laravel/framework require illuminate/filesystem: 5.1.x.

How can configure my composer.json file?

Note: I have "minimum-stability": "dev" and "prefer-stable": true in my composer.json file.

On installing, I get this error:

Problem 1
    - Conclusion: remove laravel/framework 5.1.x-dev
    - barryvdh/laravel-ide-helper 2.0.x-dev requires illuminate/filesystem 5.0.x -> satisfiable by illuminate/filesystem[5.0.x-dev, v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.4].
    - barryvdh/laravel-ide-helper v2.0.0 requires illuminate/filesystem 5.0.x -> satisfiable by illuminate/filesystem[5.0.x-dev, v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.4].
    - barryvdh/laravel-ide-helper v2.0.1 requires illuminate/filesystem 5.0.x -> satisfiable by illuminate/filesystem[5.0.x-dev, v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.4].
    - barryvdh/laravel-ide-helper v2.0.2 requires illuminate/filesystem 5.0.x -> satisfiable by illuminate/filesystem[5.0.x-dev, v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.4].
    - barryvdh/laravel-ide-helper v2.0.3 requires illuminate/filesystem 5.0.x -> satisfiable by illuminate/filesystem[5.0.x-dev, v5.0.0, v5.0.22, v5.0.25, v5.0.26, v5.0.28, v5.0.4].
    - don't install illuminate/filesystem 5.0.x-dev|don't install laravel/framework 5.1.x-dev
    - don't install illuminate/filesystem v5.0.0|don't install laravel/framework 5.1.x-dev
    - don't install illuminate/filesystem v5.0.22|don't install laravel/framework 5.1.x-dev
    - don't install illuminate/filesystem v5.0.25|don't install laravel/framework 5.1.x-dev
    - don't install illuminate/filesystem v5.0.26|don't install laravel/framework 5.1.x-dev
    - don't install illuminate/filesystem v5.0.28|don't install laravel/framework 5.1.x-dev
    - don't install illuminate/filesystem v5.0.4|don't install laravel/framework 5.1.x-dev
    - Installation request for laravel/framework 5.1.* -> satisfiable by laravel/framework[5.1.x-dev].
    - Installation request for barryvdh/laravel-ide-helper ^2.0@dev -> satisfiable by barryvdh/laravel-ide-helper[2.0.x-dev, v2.0.0, v2.0.1, v2.0.2, v2.0.3].

I have tried all below commands with the same results...

$ composer require barryvdh/laravel-ide-helper,
$ composer require barryvdh/laravel-ide-helper:@dev --dev
$ composer require barryvdh/laravel-ide-helper --dev --update-with-dependencies

I have tried also to create one alias on composer.json file:

"require": {
    "laravel/framework": "5.1.*",
    "illuminate/filesystem": "5.1.x-dev as 5.0.28"
},

And then have this error:

  Problem 1
    - Installation request for barryvdh/laravel-ide-helper dev-master -> satisfiable by barryvdh/laravel-ide-helper[dev-master].
    - Conclusion: remove laravel/framework 5.1.x-dev
    - Conclusion: don't install laravel/framework 5.1.x-dev
    - barryvdh/laravel-ide-helper dev-master requires illuminate/filesystem 5.0.x -> satisfiable by illuminate/filesystem[5.0.x-dev, 5.0.28].
    - don't install illuminate/filesystem 5.0.x-dev|don't install laravel/framework 5.1.x-dev
    - don't install illuminate/filesystem 5.0.28|don't install laravel/framework 5.1.x-dev
    - Installation request for laravel/framework 5.1.* -> satisfiable by laravel/framework[5.1.x-dev].

And this is my composer.json file:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "type": "project",
    "require": {
        "laravel/framework": "5.1.*",
        "illuminate/filesystem": "5.1.x-dev as 5.0.28"
    },
    "require-dev": {
        "phpunit/phpunit": "~4.0",
        "phpspec/phpspec": "~2.1"
    },
    "autoload": {
        "classmap": [
            "database"
        ],
        "psr-4": {
            "Portal\\": "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-create-project-cmd": [
            "php -r \"copy('.env.example', '.env');\"",
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    },
    "minimum-stability": "dev",
    "prefer-stable": true
}
Wouter J
  • 41,455
  • 15
  • 107
  • 112
Juan Antonio Tubío
  • 1,172
  • 14
  • 28

3 Answers3

0

The core problem stems from the overly-restrictive version constraint to 5.0.x. I don't know if there's a good reason for this or not.

One option would be to fork laravel-ide-helper into your own repo, change the version constraints to something like ^5.0 (and perhaps the package name), and add your forked repo as a git repository in your composer.json file. This would allow you to at least see if it works as expected.

wunch
  • 1,092
  • 9
  • 12
0

The problem is, as you pointed out, that you have Laravel 5.1 installed (which btw is still unstable, I wouldn't recommend using it atm) and the package requires 5.0.*.

There are a few solutions:

  • Create an issue in the laravel ide helper repository, asking the author to ease the version constraint. Please be aware that this library is very closely related to the version, which probably is why the version constraint is so strict.
  • Don't install the unstable 5.1 version, but stick to 5.0 and use 5.1 when it's released and the package is updated.
Wouter J
  • 41,455
  • 15
  • 107
  • 112
  • Thanks, I know that 5.1 version is unstable, but I want to test them. I have also opened one issue on laravel ide helper GitHub page. Today I'm only testing but tomorrow perhaps I have some similar problem on one customer application and this is why I'm asking about resolving these conflicts – Juan Antonio Tubío May 03 '15 at 12:18
0

I have solved with one alias in my composer.json file:

"require": {
    "laravel/framework": "5.1.x-dev as 5.0.28"
},

So, laravel/framework have "illuminate/filesystem": "5.1.x-dev" and barryvdh/laravel-ide-helper thinks that have "illuminate/filesystem": "5.0.28"

My first approach:

"require": {
    "laravel/framework": "5.1.*",
    "illuminate/filesystem": "5.1.x-dev as 5.0.28"
},

it's not working because illuminate/filesystem it's used as subtree by laravel/framework and then i have to set the alias for laravel/framework instead of illuminate/filesystem.

Juan Antonio Tubío
  • 1,172
  • 14
  • 28