Skip to content

Commit 33b0875

Browse files
committed
refactor: rename ini for composer api use
1 parent c54e208 commit 33b0875

File tree

7 files changed

+10
-11
lines changed

7 files changed

+10
-11
lines changed

agent/lib_composer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static void nr_execute_handle_autoload_composer_get_packages_information(
114114
}
115115

116116
// nurunlikely because this should alredy be ensured by the caller
117-
if (nrunlikely(!NRINI(vulnerability_management_composer_detection_enabled))) {
117+
if (nrunlikely(!NRINI(vulnerability_management_composer_api_enabled))) {
118118
// do nothing when use of composer to collect package info is disabled
119119
return;
120120
}

agent/php_execute.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -940,7 +940,7 @@ static void nr_execute_handle_autoload(const char* filename, const size_t filena
940940
return;
941941
}
942942

943-
if (!NRINI(vulnerability_management_composer_detection_enabled)) {
943+
if (!NRINI(vulnerability_management_composer_api_enabled)) {
944944
// do nothing when use of composer to collect package info is disabled
945945
return;
946946
}

agent/php_newrelic.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,7 @@ nrinibool_t
594594
vulnerability_management_package_detection_enabled; /* newrelic.vulnerability_management.package_detection.enabled
595595
*/
596596
nrinibool_t
597-
vulnerability_management_composer_detection_enabled; /* newrelic.vulnerability_management.composer_detection.enabled
598-
*/
597+
vulnerability_management_composer_api_enabled; /* newrelic.vulnerability_management.composer_api.enabled */
599598

600599
#if ZEND_MODULE_API_NO < ZEND_7_4_X_API_NO
601600
/*

agent/php_nrini.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3091,11 +3091,11 @@ STD_PHP_INI_ENTRY_EX("newrelic.vulnerability_management.package_detection.enable
30913091
newrelic_globals,
30923092
nr_enabled_disabled_dh)
30933093

3094-
STD_PHP_INI_ENTRY_EX("newrelic.vulnerability_management.composer_detection.enabled",
3094+
STD_PHP_INI_ENTRY_EX("newrelic.vulnerability_management.composer_api.enabled",
30953095
"0",
30963096
NR_PHP_REQUEST,
30973097
nr_boolean_mh,
3098-
vulnerability_management_composer_detection_enabled,
3098+
vulnerability_management_composer_api_enabled,
30993099
zend_newrelic_globals,
31003100
newrelic_globals,
31013101
nr_enabled_disabled_dh)

agent/scripts/newrelic.ini.template

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1333,11 +1333,11 @@ newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log"
13331333
;
13341334
;newrelic.vulnerability_management.package_detection.enabled = true
13351335

1336-
; Setting: newrelic.vulnerability_management.composer_detection.enabled
1336+
; Setting: newrelic.vulnerability_management.composer_api.enabled
13371337
; Type : boolean
13381338
; Scope : per-directory
13391339
; Default: false
13401340
; Info : Toggles whether the agent should try using Composer's runtime API
1341-
; to gather package detection information for vulnerability management.
1341+
; to gather package information for vulnerability management.
13421342
;
1343-
;newrelic.vulnerability_management.composer_detection.enabled = false
1343+
;newrelic.vulnerability_management.composer_api.enabled = false

tests/integration/autoloader/test_autoloader_with_composer_enabled.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*/
1313

1414
/*INI
15-
newrelic.vulnerability_management.composer_detection.enabled=true
15+
newrelic.vulnerability_management.composer_api.enabled=true
1616
*/
1717

1818
/*EXPECT_PHP_PACKAGES

tests/integration/autoloader/test_autoloader_without_composer_enabled.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*/
1212

1313
/*INI
14-
newrelic.vulnerability_management.composer_detection.enabled=true
14+
newrelic.vulnerability_management.composer_api.enabled=true
1515
*/
1616

1717
/*EXPECT_METRICS_EXIST

0 commit comments

Comments
 (0)