I am building a Package Management System with Zend Framework 2. At one point i have to compare a package Version with a package dependency filter. The version has to be a complete version for example: "3.1.5". But the packate dependency filter can contain wildcards. For example "3.1", this means that the package dependency filter can be any versions from "3.1.0" to "3.1.AnyNumber".
What is the best way to find out if the package version "3.1.5" belongs the the package dependency filter of "3.1"?
i've already tried the PHP native version_compare function but that only seams to work for standardized complete versions.
Currently my solution is to explode both the version an the filter, and then compare the subVersions to the subFilters. But i'm not happy with my solution.
Thankx in advance