From 55e829427eb93f30c795956941c353152600a61f Mon Sep 17 00:00:00 2001 From: Ayesh Karunaratne Date: Fri, 22 Nov 2024 08:42:48 +0700 Subject: [PATCH] Replace ext version if it's identical to the PHP version --- src/Sources/ExtensionListSource.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Sources/ExtensionListSource.php b/src/Sources/ExtensionListSource.php index 9f1d1af1..fa24d4d7 100644 --- a/src/Sources/ExtensionListSource.php +++ b/src/Sources/ExtensionListSource.php @@ -37,6 +37,10 @@ private static function handleExtensionList(array $extList, Output $output) { if ($metafile !== false && file_exists($metafile)) { $meta = require $metafile; } else { + $extVersion = $reflection->getVersion(); + if ($extVersion !== PHP_VERSION) { + $extVersion = '__DYNAMIC__PHP Version'; + } // embed generic meta data $meta = array( 'type' => 'extension', @@ -46,7 +50,7 @@ private static function handleExtensionList(array $extList, Output $output) { 'added' => '0.0', 'deprecated' => $reflection, 'removed' => null, - 'version' => $reflection->getVersion(), + 'version' => $extVersion, 'resources' => static::generateResources($name), ); }