2
  • I assume that installed.json contains all the dependencies needed for Magento.
  • How can I properly extend vendor/composer/installed.json?

Context:

  • Magento has a hard dependency on one of the libraries, more specifically a specific version of a third party module msp/recaptcha:2.0.2. I want to update it to 2.1.2.
  • Now if it were a softer dependency (~2.0.2) I could have done so from composer.json as described in the answer of this question

By this point it should be clear what I need to achieve and why. Please ask for any more details if needed. Thanks.

  • In your opinion do you think it should be a soft dependency? – Dominic Xigen Jun 3 at 22:26
  • Not necessarily. I suspect they their reasons to make it a hard dependency, but still I should have a way to extend|change this (for this library or any other), at my own responsibility. – vitoriodachef Jun 4 at 7:13
1

Depends what you mean by extend.

Certainly this route works.

So remove original via composer

    "replace": {
        "msp/recaptcha": "*"
    },

composer install

Package operations: 0 installs, 0 updates, 1 removal
  - Removing msp/recaptcha (2.0.2)
Removing Msp/Recaptcha

https://github.com/magento/magespecialist_ReCaptcha/tree/v2.1.2

Extract 2.1.2 to app/code/MSP/ReCaptcha

php bin/magento setup:upgrade

Check setup_module table and MSP_ReCaptcha entry says 1.5.0.

Matches what's in code

https://github.com/magento/magespecialist_ReCaptcha/blob/v2.1.2/etc/module.xml#L24

Site seems functional. That's good enough for me. I'm now in control of this extension.

  • :) Thanks for the answer, this is what I ended up doing as well. I'm wondering if there is another way. A "Magento" way. I'll keep the question open if you don't mind. – vitoriodachef Jun 4 at 13:11
  • ha! yes the "Magento" way isn't always the way everyone else does it – Dominic Xigen Jun 4 at 13:14

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.