diff --git a/daemon/internal/newrelic/integration/php_packages.go b/daemon/internal/newrelic/integration/php_packages.go index 0233b9b4e..5151359d9 100644 --- a/daemon/internal/newrelic/integration/php_packages.go +++ b/daemon/internal/newrelic/integration/php_packages.go @@ -31,11 +31,12 @@ type PhpPackagesCollection struct { // PHP packages config describes how to collect the JSON for the packages installed // for the current test case type PhpPackagesConfiguration struct { - path string - command string - supportedListFile string - expectedPackages []string - packageNameOnly []string + path string + command string + supportedListFile string + overrideVersionsFile string + expectedPackages []string + packageNameOnly []string } // composer package JSON @@ -135,6 +136,7 @@ func NewPhpPackagesCollection(path string, config []byte) (*PhpPackagesCollectio var supportedListFile string var expectedPackages string var packageNameOnly string + var overrideVersionsFile string var expectedPackagesArr []string var packageNameOnlyArr []string var commandOK, supportedOK, expectedOK bool @@ -177,13 +179,36 @@ func NewPhpPackagesCollection(path string, config []byte) (*PhpPackagesCollectio } } + // option file containing overrides for expected package versions + // this is useful when a package is detected as the wrong version + // because the internal mechanism the agent uses to get pacakge + // versions was not updated by the upstream maintainers properly + // on a release. + // + // this is a JSON file of the format + // { + // "": "