Magento-2.1 – Composer Package Requirements Unresolved

composerlocalisationmagento-2.1

I created a package on packagist.org for the de_CH locale which is basically cloned from de_DE. Installing the de_DE package works fine via composer with Magento 2.1, but de_CH doesn't, although composer.json is (almost) the same. Only name and description differ, which shouldn't be the problem. The require definition is 100% the same in the composer.json files, but when I look at the packagist detail pages I notice 2 differences, the latter of which I seem not be able to influence.

  • version number 1.0.0 vs 1.8.0
  • requires magento/framework: 100.0.* vs magento/framework: ^100.0.0

The only thing I can think of right now is increasing the tag from 1.0.0 to something higher.

This is the output I get during installation:

$ composer require openstream/mage2-locale-de-ch
Using version ^1.0 for openstream/mage2-locale-de-ch
./composer.json has been updated
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
    - Installation request for openstream/mage2-locale-de-ch ^1.0 -> satisfiable by openstream/mage2-locale-de-ch[1.0.0].
    - Conclusion: remove magento/framework 100.1.0
    - Conclusion: don't install magento/framework 100.1.0
    - openstream/mage2-locale-de-ch 1.0.0 requires magento/framework 100.0.* -> satisfiable by magento/framework[100.0.10, 100.0.11, 100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.0.6, 100.0.7, 100.0.8, 100.0.9].
    - Can only install one of: magento/framework[100.1.0, 100.0.10].
    - Can only install one of: magento/framework[100.1.0, 100.0.11].
    - Can only install one of: magento/framework[100.1.0, 100.0.2].
    - Can only install one of: magento/framework[100.1.0, 100.0.3].
    - Can only install one of: magento/framework[100.1.0, 100.0.4].
    - Can only install one of: magento/framework[100.1.0, 100.0.5].
    - Can only install one of: magento/framework[100.1.0, 100.0.6].
    - Can only install one of: magento/framework[100.1.0, 100.0.7].
    - Can only install one of: magento/framework[100.1.0, 100.0.8].
    - Can only install one of: magento/framework[100.1.0, 100.0.9].
    - Installation request for magento/framework (locked at 100.1.0) -> satisfiable by magento/framework[100.1.0].


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

Any ideas what else I might be missing here?

Best Answer

Packagist reads the requirement for the latest release, which is 1.0.0

At that point, your composer.json looked like this

"magento/framework": "100.0.*"

The issue you described was fixed in this commit but it is not part of any release yet.

Requiring a development version should work:

composer require openstream/mage2-locale-de-ch dev-master

But I guess it is time for a 1.1.0 release of your package.

Related Topic