0
votes

My package relies on illuminate/support ~4.1.

I am trying to install this package in a Laravel project whose composer.json file demands "laravel/framework": "4.1.*".

But when I run composer require and try to install this package, I ultimately run into this error each time:

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

  Problem 1
    - Conclusion: remove laravel/framework v4.1.29
    - adityamenon/postcodes-io-laravel 1.0.0 requires illuminate/support 4.2.* -> satisfiable by illuminate/support[v4.2.1, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
    - adityamenon/postcodes-io-laravel 1.0.1 requires illuminate/support 4.2.* -> satisfiable by illuminate/support[v4.2.1, v4.2.2, v4.2.3, v4.2.4, v4.2.5, v4.2.6, v4.2.7, v4.2.8, v4.2.9].
    - don't install illuminate/support v4.2.1|don't install laravel/framework v4.1.29
    - don't install illuminate/support v4.2.2|don't install laravel/framework v4.1.29
    - don't install illuminate/support v4.2.3|don't install laravel/framework v4.1.29
    - don't install illuminate/support v4.2.4|don't install laravel/framework v4.1.29
    - don't install illuminate/support v4.2.5|don't install laravel/framework v4.1.29
    - don't install illuminate/support v4.2.6|don't install laravel/framework v4.1.29
    - don't install illuminate/support v4.2.7|don't install laravel/framework v4.1.29
    - don't install illuminate/support v4.2.8|don't install laravel/framework v4.1.29
    - don't install illuminate/support v4.2.9|don't install laravel/framework v4.1.29
    - Installation request for laravel/framework == 4.1.29.0 -> satisfiable by laravel/framework[v4.1.29].
    - Installation request for adityamenon/postcodes-io-laravel ~1.0 -> satisfiable by adityamenon/postcodes-io-laravel[1.0.0, 1.0.1].


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

What am I doing wrong?

2
It would be helpful to see your composer.json file.Justin Howard

2 Answers

2
votes

You install adityamenon/postcodes-io-laravel ~1.0, as we read in one of the last items in the error message:

Installation request for adityamenon/postcodes-io-laravel ~1.0 -> satisfiable by adityamenon/postcodes-io-laravel[1.0.0, 1.0.1].

This means 1.0.0 or 1.0.1 (also showed in this item). Looking at packagist, both 1.0.0 and 1.0.1 require illuminate/support 4.2.* (shown in the second and third item of the error message). You install laravel/framework 4.1.*. Since 4.1.* is not within the range of 4.2.* (the required version for the package), it'll fail.

You probably want to install the dev version, which you can do by tagging it with @dev:

{
    ...
    "require": {
        "adityamenon/postcodes-io-laravel": "dev-master"
    }
}

Btw, it's not a good idea to really rely on dev-master. You should always try to alias the master branch to a specific dev version.

1
votes

It seems you are the author of that package.

My package relies on illuminate/support ~4.1.

This is wrong for all published versions 1.0.0 and 1.0.1 - these versions rely on illuminate/support 4.2.*.

Only the master branch relies on ~4.1 - if you want to publish that, simply tag the current master branch as either version 1.0.2 or 1.1.0 (depending on whether did only bugfixes or changed it's interface - maybe it's even an incompatible version 2.0.0).

Then you can update your other software to use your package together with Laravel 4.1.