0

Can anybody just give me complete example how to require in composer.json some existing magento module (for some my personal extension). And dependency should work in any magento 2.x.x version. For example for magento/module-catalog?

  "require": {
    "php": "~5.5.0|~5.6.0",
    "magento/module-store": "^100.0.0",
    "magento/module-catalog": "^100.0.0",
    "magento/module-catalog-inventory": "^100.0.0",
    "magento/module-ui": "^100.0.0",
    "magento/magento-composer-installer": "*"
  },

Console:

Using version dev-master for vendor/module                           
./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 magento/magento2ce 2.2.0-dev -> satisfiable by magento/magento2ce[2.2.0-dev].
    - vendor/module dev-master requires magento/module-catalog ^100.0.0 -> satisfiable by magento/module-catalog[100.0.2, 100.0.3, 100.0.4, 100.0.5, 100.0.6, 100.0.7, 100.0.8, 100.0.9].
    - don't install magento/module-catalog 100.0.2|remove magento/magento2ce 2.2.0-dev
    - don't install magento/module-catalog 100.0.3|remove magento/magento2ce 2.2.0-dev
    - don't install magento/module-catalog 100.0.4|remove magento/magento2ce 2.2.0-dev
    - don't install magento/module-catalog 100.0.5|remove magento/magento2ce 2.2.0-dev
    - don't install magento/module-catalog 100.0.6|remove magento/magento2ce 2.2.0-dev
    - don't install magento/module-catalog 100.0.7|remove magento/magento2ce 2.2.0-dev
    - don't install magento/module-catalog 100.0.8|remove magento/magento2ce 2.2.0-dev
    - don't install magento/module-catalog 100.0.9|remove magento/magento2ce 2.2.0-dev
    - Installation request for vendor/module dev-master -> satisfiable by vendor/module[dev-master]. 

Installation failed, reverting ./composer.json to its original content.
  • Have you tried other wildcard operators? – Steve Johnson Oct 11 '16 at 14:44
  • Unfortunately I tried everything. 100.0.* or 100.* or 100.0.*|100.1.* or with ~ – zhartaunik Oct 11 '16 at 15:44
  • 1
    I guess magento/magento2ce 2.2.0-dev is incompatible with magento/module-catalog ^100.0.0. Could you, please, show what is magento/magento2ce 2.2.0-dev you're installing? Or show your root composer.json to see all dependencies that you have. – BuskaMuza Oct 13 '16 at 22:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.