diff --git a/agent/lib_composer.c b/agent/lib_composer.c index 1f04d33b6..ac3ad4171 100644 --- a/agent/lib_composer.c +++ b/agent/lib_composer.c @@ -110,7 +110,11 @@ static void nr_execute_handle_autoload_composer_get_packages_information( = "" "(function() {" " try {" - " return \\Composer\\InstalledVersions::getVersion(\"%s\");" + " $v = \\Composer\\InstalledVersions::getPrettyVersion(\"%s\");" + " if ($v != null && strlen($v) > 0) {" + " $v = ltrim($v, 'v');" + " }" + " return $v;" " } catch (Exception $e) {" " return NULL;" " }"