diff --git a/src/Composer/Package/LinkConstraint/VersionConstraint.php b/src/Composer/Package/LinkConstraint/VersionConstraint.php index c7cf62ff2..6e98d73a0 100644 --- a/src/Composer/Package/LinkConstraint/VersionConstraint.php +++ b/src/Composer/Package/LinkConstraint/VersionConstraint.php @@ -32,6 +32,7 @@ class VersionConstraint extends SpecificConstraint */ public function __construct($operator, $version) { + // TODO add third parameter releaseType and match that too $this->operator = $operator; $this->version = $version; } diff --git a/src/Composer/Repository/PlatformRepository.php b/src/Composer/Repository/PlatformRepository.php index 361809e5a..2e784e24d 100644 --- a/src/Composer/Repository/PlatformRepository.php +++ b/src/Composer/Repository/PlatformRepository.php @@ -32,6 +32,13 @@ class PlatformRepository extends ArrayRepository $php = new MemoryPackage('php', $version['version'], $version['type']); $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); + } } } \ No newline at end of file