Alleviating strict versioning with (original) (raw)
– Alleviating strict versioning with
Working with dependency versions and
The tag is designed to be used with a dependency that contains a version tag from package pear.example.com/Bar version 1.3.0 like so:
Foo pear.example.com 1.0.0 1.5.2The above dependency can be translated into English as follows: "Use the package pear.example.com/Foo, but only versions 1.0.0 or newer. If pear.example.com/Foo is not installed, install version 1.5.2. If pear.example.com/Foo is installed and is not version 1.5.2, fail unless --force is specified, or pear.example.com/Foo is compatible with me."
That last clause "...or pear.example.com/Foo is compatible with me." is controlled by the tag. If package Foo version 1.5.3's package.xml has a like so:
Bar pear.example.com 1.2.0 1.3.0 1.2.9This will instruct the installer that pear.example.com/Foo version 1.5.3 is compatible with pear.example.com/Bar 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 tag. Future versions of pear.example.com/Bar should simply upgrade the tag.
may contain three versioning tags. The required and are used to define the range of tested and compatible versions, and 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 tags inside a package.xml.