JavaScript Editor Javascript validator     Web page editor 


<compatible> -- Alleviating strict versioning with <compatible>

Working with <recommended> dependency versions and <compatible>

The <compatible> tag is designed to be used with a <package> dependency that contains a <recommended> version tag from package version 1.3.0 like so:


The above dependency can be translated into English as follows: "Use the package, but only versions 1.0.0 or newer. If is not installed, install version 1.5.2. If is installed and is not version 1.5.2, fail unless --force is specified, or is compatible with me."

That last clause "...or is compatible with me." is controlled by the <compatible> tag. If package Foo version 1.5.3's package.xml has a <compatible> like so:


This will instruct the installer that version 1.5.3 is compatible with versions 1.2.0 to 1.3.0 inclusive, but is not compatible with 1.2.9.

It is very important to note that only existing versions that have been tested with the package should be mentioned in the <compatible> tag. Future versions of should simply upgrade the <recommended> tag.

<compatible> may contain three versioning tags. The required <min> and <max> are used to define the range of tested and compatible versions, and <exclude> is used to exclude any versions within the range. In the example above, 1.3.0 and 1.2.0 are the highest and lowest versions that may be excluded. There can be an unlimited number of <compatible> tags inside a package.xml.

See also:

<package> dependencies

JavaScript Editor Javascript validator     Web page editor