In Drupal 6, dependencies[] = foo
. In Drupal 7, dependencies[] = foo (>=2.x, <4.17, !=3.7)
. Meaning, we need foo module major version to be at least 2, any version up to (but not including) 4.17 aside from 3.7 which was horribly buggy. If you need to do this with core, uses system in place of foo. Also note that you can say dependencies[] = foo (>=7.x-2.x)
.
Commenting on this Story is closed.
such features are what makes drupal special
I was discussing such a feature with a colleague earlier this week, not knowing that it's part of D7... Awesome!
>=2.x, <4.17 !=3.7
There's a comma in-between the first two conditions, but not the second and third? Typo or is that how it works?
Also could this multiple syntax be contributed back to http://drupal.org/node/542202 since it doesn't seem to mention it?
Going by the patch that was committed from the original issue for this, it looks like the missing comma is a typo. The test code that landed in system.test all have commas, and the corresponding code itself does a split() on commas while parsing the dependencies string. I've updated the documentation page mentionend above accordingly.
thanks