From 609646dcde39e2a6a27fd3f2659f34409bbd4f36 Mon Sep 17 00:00:00 2001 From: Daniel Scherzer Date: Sat, 5 Jul 2025 13:02:42 -0700 Subject: [PATCH] Remove old exception class getters --- UPGRADING.INTERNALS | 3 +++ Zend/zend_exceptions.c | 14 -------------- Zend/zend_exceptions.h | 6 ------ 3 files changed, 3 insertions(+), 20 deletions(-) diff --git a/UPGRADING.INTERNALS b/UPGRADING.INTERNALS index 67c779ea637c8..30b82a3618812 100644 --- a/UPGRADING.INTERNALS +++ b/UPGRADING.INTERNALS @@ -43,6 +43,9 @@ PHP 8.5 INTERNALS UPGRADE NOTES . Added the zend_update_exception_properties() function for instantiating Exception child classes. It updates the $message, $code, and $previous properties. + . zend_exception_get_default() was removed, use zend_ce_exception directly. + . zend_get_error_exception() was removed, use zend_ce_error_exception + directly. . ZEND_IS_XDIGIT() macro was removed because it was unused and its name did not match its actual behavior. . zend_register_constant() now returns a pointer to the added constant diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c index 212fe3cb7ab66..7366eeaa2dd57 100644 --- a/Zend/zend_exceptions.c +++ b/Zend/zend_exceptions.c @@ -846,20 +846,6 @@ void zend_register_default_exception(void) /* {{{ */ } /* }}} */ -/* {{{ Deprecated - Use zend_ce_exception directly instead */ -ZEND_API zend_class_entry *zend_exception_get_default(void) -{ - return zend_ce_exception; -} -/* }}} */ - -/* {{{ Deprecated - Use zend_ce_error_exception directly instead */ -ZEND_API zend_class_entry *zend_get_error_exception(void) -{ - return zend_ce_error_exception; -} -/* }}} */ - static zend_object *zend_throw_exception_zstr(zend_class_entry *exception_ce, zend_string *message, zend_long code) /* {{{ */ { zval ex, tmp; diff --git a/Zend/zend_exceptions.h b/Zend/zend_exceptions.h index 35f6699559421..5df49dcd6a3a6 100644 --- a/Zend/zend_exceptions.h +++ b/Zend/zend_exceptions.h @@ -50,12 +50,6 @@ void zend_register_default_exception(void); ZEND_API zend_class_entry *zend_get_exception_base(zend_object *object); -/* Deprecated - Use zend_ce_exception directly instead */ -ZEND_API zend_class_entry *zend_exception_get_default(void); - -/* Deprecated - Use zend_ce_error_exception directly instead */ -ZEND_API zend_class_entry *zend_get_error_exception(void); - ZEND_API void zend_register_default_classes(void); /* exception_ce NULL, zend_ce_exception, zend_ce_error, or a derived class