|
33 | 33 | ZEND_TSRMLS_CACHE_DEFINE() |
34 | 34 | #endif |
35 | 35 |
|
| 36 | +/** |
| 37 | + * The list of modules to reload on each request. If an external module |
| 38 | + * requires to be reloaded between requests, it is possible to hook on |
| 39 | + * `sapi_module.activate` and `sapi_module.deactivate`. |
| 40 | + * |
| 41 | + * @see https://github.com/DataDog/dd-trace-php/pull/3169 for an example |
| 42 | + */ |
36 | 43 | static const char *MODULES_TO_RELOAD[] = {"filter", "session", NULL}; |
37 | 44 |
|
38 | 45 | frankenphp_version frankenphp_get_version() { |
@@ -121,7 +128,6 @@ static void frankenphp_worker_request_shutdown() { |
121 | 128 | zend_try { php_output_end_all(); } |
122 | 129 | zend_end_try(); |
123 | 130 |
|
124 | | - /* TODO: store the list of modules to reload in a global module variable */ |
125 | 131 | const char **module_name; |
126 | 132 | zend_module_entry *module; |
127 | 133 | for (module_name = MODULES_TO_RELOAD; *module_name; module_name++) { |
@@ -223,7 +229,6 @@ static int frankenphp_worker_request_startup() { |
223 | 229 | } |
224 | 230 | } |
225 | 231 |
|
226 | | - /* TODO: store the list of modules to reload in a global module variable */ |
227 | 232 | const char **module_name; |
228 | 233 | zend_module_entry *module; |
229 | 234 | for (module_name = MODULES_TO_RELOAD; *module_name; module_name++) { |
@@ -546,10 +551,7 @@ static int frankenphp_startup(sapi_module_struct *sapi_module) { |
546 | 551 | return php_module_startup(sapi_module, &frankenphp_module); |
547 | 552 | } |
548 | 553 |
|
549 | | -static int frankenphp_deactivate(void) { |
550 | | - /* TODO: flush everything */ |
551 | | - return SUCCESS; |
552 | | -} |
| 554 | +static int frankenphp_deactivate(void) { return SUCCESS; } |
553 | 555 |
|
554 | 556 | static size_t frankenphp_ub_write(const char *str, size_t str_length) { |
555 | 557 | struct go_ub_write_return result = |
|
0 commit comments