Skip to content

Commit b0f3049

Browse files
committed
remove nr_php_amqplib_ensure_class
With new way of storing named wraprecs, agent's instrumentation no longer depends on classes being loaded.
1 parent 0131318 commit b0f3049

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

agent/lib_php_amqplib.c

-24
Original file line numberDiff line numberDiff line change
@@ -81,29 +81,6 @@
8181
* needed to work with MQ_BROKER.
8282
*/
8383

84-
/*
85-
* Purpose : Ensures the php-amqplib instrumentation gets wrapped.
86-
*
87-
* Params : None
88-
*
89-
* Returns : None
90-
*/
91-
static void nr_php_amqplib_ensure_class() {
92-
int result = FAILURE;
93-
zend_class_entry* class_entry = NULL;
94-
95-
class_entry = nr_php_find_class("phpamqplib\\channel\\amqpchannel");
96-
if (NULL == class_entry) {
97-
result = zend_eval_stringl(
98-
NR_PSTR("class_exists('PhpAmqpLib\\Channel\\AMQPChannel');"), NULL,
99-
"nr_php_amqplib_class_exists_channel_amqpchannel");
100-
}
101-
/*
102-
* We don't need to check anything else at this point. If this fails, there's
103-
* nothing else we can do anyway.
104-
*/
105-
}
106-
10784
/*
10885
* Version information will be pulled from PhpAmqpLib\\Package::VERSION
10986
* nr_php_amqplib_handle_version will automatically load the class if it isn't
@@ -810,7 +787,6 @@ void nr_php_amqplib_enable() {
810787

811788
/* Extract the version */
812789
nr_php_amqplib_handle_version();
813-
nr_php_amqplib_ensure_class();
814790

815791
#if ZEND_MODULE_API_NO >= ZEND_8_0_X_API_NO /* less than PHP8.0 */
816792
nr_php_wrap_user_function_before_after_clean(

0 commit comments

Comments
 (0)