diff --git a/src/Composer/Repository/PlatformRepository.php b/src/Composer/Repository/PlatformRepository.php index 0a2e79f35..5ebb6c9db 100644 --- a/src/Composer/Repository/PlatformRepository.php +++ b/src/Composer/Repository/PlatformRepository.php @@ -157,6 +157,18 @@ class PlatformRepository extends ArrayRepository break; + case 'imagick': + $reflector = new \ReflectionExtension('imagick'); + + ob_start(); + $reflector->info(); + $output = ob_get_clean(); + + preg_match('/^Imagick using ImageMagick library version => ImageMagick ([\d.]+)-(\d+)/m', $output, $matches); + $prettyVersion = "{$matches[1]}.{$matches[2]}"; + + break; + case 'libxml': $prettyVersion = LIBXML_DOTTED_VERSION; break;