PlatformRepository now adds packages for every loaded php extension as well
parent
05d527446b
commit
56da52d38f
|
@ -32,6 +32,7 @@ class VersionConstraint extends SpecificConstraint
|
||||||
*/
|
*/
|
||||||
public function __construct($operator, $version)
|
public function __construct($operator, $version)
|
||||||
{
|
{
|
||||||
|
// TODO add third parameter releaseType and match that too
|
||||||
$this->operator = $operator;
|
$this->operator = $operator;
|
||||||
$this->version = $version;
|
$this->version = $version;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,13 @@ class PlatformRepository extends ArrayRepository
|
||||||
$php = new MemoryPackage('php', $version['version'], $version['type']);
|
$php = new MemoryPackage('php', $version['version'], $version['type']);
|
||||||
$this->addPackage($php);
|
$this->addPackage($php);
|
||||||
|
|
||||||
// TODO check for php extensions
|
foreach (get_loaded_extensions() as $ext) {
|
||||||
|
if (in_array($ext, array('standard', 'Core'))) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// TODO maybe we could parse versions from phpinfo(INFO_MODULES)
|
||||||
|
$ext = new MemoryPackage('ext/'.strtolower($ext), '0', 'stable');
|
||||||
|
$this->addPackage($ext);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue