0

Let's say I have 2 modules Foo_BarA and Foo_BarB. We could declare Foo_BarB's dependency on Foo_BarA in app/etc/modules/Foo_BarB.xml like this:

<config>
  <modules>
    <Foo_BarB>
      <active>true</active>
      <codePool>community</codePool>
      <depends>
        <Foo_BarA/>
      </depends>
    </Foo_BarB>
  </modules>
</config> 

But is it possible to specify the minimum required version of Foo_BarA as well, in Foo_BarB.xml?

e.g. something like this maybe?

<config>
  <modules>
    <Foo_BarB>
      <active>true</active>
      <codePool>community</codePool>
      <depends>
        <Foo_BarA>
          <version>2.0.1</version>
        </Foo_BarA>
      </depends>
    </Foo_BarB>
  </modules>
</config>
2

It's not possible in the way you mentioned above, but what you can do is add a check in your Foo_BarB extension to check if the version of Foo_BarA is 2.0.1. You could use the code below:

return (string) Mage::getConfig()->getNode()->modules->Foo_Bar!->version;
  • 1
    Maybe add that to an install script? – Sander Mangel Jan 16 '16 at 13:44

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.