-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Laminas 3.x support. #36
Conversation
ok jenkins |
agent/fw_laminas3.c
Outdated
#include "util_memory.h" | ||
|
||
/* | ||
* Laminas is a rebranding of Zend, but the logic remains the same, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's an extra space here before the Laminas
comment
agent/lib_zend_http.c
Outdated
nr_php_wrap_user_function(NR_PSTR(http_client_request), | ||
nr_zend_http_client_request TSRMLS_CC); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra line needed
agent/lib_zend_http.c
Outdated
static char library_name[50] = "Zend"; | ||
static char curl_adapter_typename[50] = "Zend_Http_Client_Adapter_Curl"; | ||
static char uri_http_typename[50] = "Zend_Uri_Http"; | ||
static char http_client[50] = "Zend_Http_Client"; | ||
static char http_client_request[50] = "Zend_Http_Client::request"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we can do this by freeing and allocating new memory for the laminas naming scheme in nr_laminas_http_enable()
, instead of copying the strings over?
Multiverse tests pass quite nicely.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks and functions nicely!
Transparency of approval: I committed to this PR, but only cosmetic ordering of values, and the feedback that @Fahmy-Mohammed left.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thanks for fixing this. I just have a couple of cosmetic suggestions that you're welcome to ignore.
agent/lib_zend_http.c
Outdated
char * library_name = LIB_NAME_Z; | ||
char * curl_adapter_typename = CURL_ADAPTER_Z; | ||
char * uri_http_typename = URI_HTTP_Z; | ||
char * http_client = HTTP_CLIENT_Z; | ||
char * http_client_request = HTTP_CLIENT_REQUEST_Z; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
char *
-> char*
agent/fw_hooks.h
Outdated
@@ -27,6 +27,7 @@ extern void nr_drupal_enable(TSRMLS_D); | |||
extern void nr_drupal8_enable(TSRMLS_D); | |||
extern void nr_joomla_enable(TSRMLS_D); | |||
extern void nr_kohana_enable(TSRMLS_D); | |||
extern void nr_fw_laminas3_enable(TSRMLS_D); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we change the name here for consistency. nr_fw_laminas3_enable
-> nr_laminas3_enable
c5b17d3
Duplicated the current
Zend
support withLaminas
naming.See https://source.datanerd.us/php-agent/multiverse/pull/56 for multiverse testing.