com php-src: Add error notification callbacks to UPGRADING.INTERNALS: UPGRADING.INTERNALS
| From: | Benjamin Eberlei | Date: | Fri, 17 Jul 2020 13:51:15 +0000 |
| Subject: | com php-src: Add error notification callbacks to UPGRADING.INTERNALS: UPGRADING.INTERNALS | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-112213@lists.php.net to get a copy of this message | ||
Commit: 4890bf19aa319b8f793d8ebc73d094c3bdeb3d67
Author: Benjamin Eberlei <kontakt@beberlei.de> Fri, 17 Jul 2020 15:51:09 +0200
Parents: 6744ead1c912a03e98de1523c81f1a3ba77c6945
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4890bf19aa319b8f793d8ebc73d094c3bdeb3d67
Log:
Add error notification callbacks to UPGRADING.INTERNALS
Changed paths:
M UPGRADING.INTERNALS
Diff:
diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS
index db249ea425..bec30c8314 100644
--- a/UPGRADING.INTERNALS
+++ b/UPGRADING.INTERNALS
@@ -21,6 +21,7 @@ PHP 8.0 INTERNALS UPGRADE NOTES
r. Cannot implement Traversable only
s. zend_fcall_info no_separation flag removed
t. Signature changes
+ u. Error Notification callbacks to replace zend_error_cb overwrite use-cases
2. Build system changes
a. Abstract
@@ -172,6 +173,22 @@ PHP 8.0 INTERNALS UPGRADE NOTES
4. Argument int to size_t in Zend Engine 4.0:
- zend_set_hash_symbol()
+ u. Instead of overwriting zend_error_cb extensions with debugging, monitoring
+ use-cases catching Errors/Exceptions are strongly encouraged to use
+ the new error notification API instead.
+
+ Error notification callbacks are guaranteed to be called regardless of
+ the users error_reporting setting or userland error handler return values.
+
+ Register notification callbacks during MINIT of an extension:
+
+ void my_error_notify_cb(int type,
+ const char *error_filename,
+ uint32_t error_lineno,
+ zend_string *message) {
+ }
+ zend_register_error_notify_callback(my_error_notify_cb);
+
========================
2. Build system changes
========================