@@ -39,6 +39,11 @@ nr_framework_classification_t nr_cakephp_special_2(
39
39
* Component::initialize(). This function takes a controller as a parameter
40
40
* and we look into the params array of that controller object, and pick up
41
41
* the controller and action out of that array.
42
+ *
43
+ * CakePHP 1.x is end-of-life and no longer supported by the agent.
44
+ * Cake PHP 1.x does not support PHP 8+ and this wrapper is not updated for OAPI
45
+ * compatibility.
46
+ *
42
47
*/
43
48
NR_PHP_WRAPPER (nr_cakephp_name_the_wt_pre20 ) {
44
49
zval * arg1 = 0 ;
@@ -130,6 +135,17 @@ NR_PHP_WRAPPER_END
130
135
* and we get the action from the params array in that object. The
131
136
* controller object ($this) has a name, and that name is used (along
132
137
* with the word "Controller" appended which is what the CakePHP code does).
138
+ *
139
+ * CakePHP 2.x is end-of-life and in maintenance mode (critical bugfixes only).
140
+ * As such, functionality added in PHP 7.1+ is not well supported.
141
+ *
142
+ * txn naming scheme:
143
+ * In this case, `nr_txn_set_path` is called after `NR_PHP_WRAPPER_CALL` with
144
+ * `NR_NOT_OK_TO_OVERWRITE`
145
+ * This entails that the last wrapped call gets to name the txn.
146
+ * No changes required to ensure OAPI compatibility this corresponds to the
147
+ * default way of calling the wrapped function in func_end.
148
+ *
133
149
*/
134
150
NR_PHP_WRAPPER (nr_cakephp_name_the_wt_2 ) {
135
151
zval * arg1 = 0 ;
@@ -243,6 +259,11 @@ NR_PHP_WRAPPER_END
243
259
*
244
260
* Dispatch::cakeError will be called if there is a problem during dispatch
245
261
* (action or controller not found).
262
+ *
263
+ * CakePHP 1.x is end-of-life and no longer supported by the agent.
264
+ * Cake PHP 1.x does not support PHP 8+ and this wrapper is not updated for OAPI
265
+ * compatibility.
266
+ *
246
267
*/
247
268
NR_PHP_WRAPPER (nr_cakephp_problem_1 ) {
248
269
const char * name = "Dispatcher::cakeError" ;
@@ -266,6 +287,16 @@ NR_PHP_WRAPPER_END
266
287
* appropriate Exception will be created and thrown. We wrap the CakeException
267
288
* constructor instead of the Exception handler, since CakePHP allows for the
268
289
* handler to be completely replaced.
290
+ *
291
+ * CakePHP 2.x is end-of-life and in maintenance mode (critical bugfixes only).
292
+ * As such, functionality added in PHP 7.1+ is not well supported.
293
+ *
294
+ * txn naming scheme:
295
+ * In this case, `nr_txn_set_path` is called before `NR_PHP_WRAPPER_CALL` with
296
+ * `NR_NOT_OK_TO_OVERWRITE` and as this corresponds to calling the wrapped
297
+ * function in func_begin it needs to be explicitly set as a before_callback to
298
+ * ensure OAPI compatibility. This entails that the first wrapped call gets to
299
+ * name the txn.
269
300
*/
270
301
NR_PHP_WRAPPER (nr_cakephp_problem_2 ) {
271
302
const char * name = "Exception" ;
@@ -298,6 +329,12 @@ void nr_cakephp_enable_1(TSRMLS_D) {
298
329
void nr_cakephp_enable_2 (TSRMLS_D ) {
299
330
nr_php_wrap_user_function (NR_PSTR ("Controller::invokeAction" ),
300
331
nr_cakephp_name_the_wt_2 TSRMLS_CC );
332
+ #if ZEND_MODULE_API_NO >= ZEND_8_0_X_API_NO \
333
+ && !defined OVERWRITE_ZEND_EXECUTE_DATA
334
+ nr_php_wrap_user_function_before_after_clean (
335
+ NR_PSTR ("CakeException::__construct" ), nr_cakephp_problem_2 , NULL , NULL );
336
+ #else
301
337
nr_php_wrap_user_function (NR_PSTR ("CakeException::__construct" ),
302
338
nr_cakephp_problem_2 TSRMLS_CC );
339
+ #endif
303
340
}
0 commit comments