i have own module in bitbucket (written at the time when was magento 2.2.x) which is overwriting magento-catalog ImageBuilder.php file.

Now after testing this with 2.3.x i found, that it isnt working. I need to overwrite another file, ImageFactory.php

So basically i need to overwrite one file for magento 2.2.x and another file for magento 2.3.x

Question is, what is best practice to do this, how to restrict that for 2.3.x will be installed latest version of module and for 2.2.x some older version ?

I guess i need to have two different branches in bibucket, and each branch will have different composer.js file ?

Probably for each version i need to specify different magento framework version in composer.js file ?

"require": {
    "magento/framework": "102.0.*"


  • Yep different branch different composer.json – Dominic Xigen Oct 7 '19 at 14:47

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.