Skip to content

Commit b0aaa31

Browse files
Remove old exception class getters (#19043)
1 parent d154c72 commit b0aaa31

File tree

3 files changed

+3
-20
lines changed

3 files changed

+3
-20
lines changed

UPGRADING.INTERNALS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ PHP 8.5 INTERNALS UPGRADE NOTES
4343
. Added the zend_update_exception_properties() function for instantiating
4444
Exception child classes. It updates the $message, $code, and $previous
4545
properties.
46+
. zend_exception_get_default() was removed, use zend_ce_exception directly.
47+
. zend_get_error_exception() was removed, use zend_ce_error_exception
48+
directly.
4649
. ZEND_IS_XDIGIT() macro was removed because it was unused and its name
4750
did not match its actual behavior.
4851
. zend_register_constant() now returns a pointer to the added constant

Zend/zend_exceptions.c

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -846,20 +846,6 @@ void zend_register_default_exception(void) /* {{{ */
846846
}
847847
/* }}} */
848848

849-
/* {{{ Deprecated - Use zend_ce_exception directly instead */
850-
ZEND_API zend_class_entry *zend_exception_get_default(void)
851-
{
852-
return zend_ce_exception;
853-
}
854-
/* }}} */
855-
856-
/* {{{ Deprecated - Use zend_ce_error_exception directly instead */
857-
ZEND_API zend_class_entry *zend_get_error_exception(void)
858-
{
859-
return zend_ce_error_exception;
860-
}
861-
/* }}} */
862-
863849
static zend_object *zend_throw_exception_zstr(zend_class_entry *exception_ce, zend_string *message, zend_long code) /* {{{ */
864850
{
865851
zval ex, tmp;

Zend/zend_exceptions.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ void zend_register_default_exception(void);
5050

5151
ZEND_API zend_class_entry *zend_get_exception_base(zend_object *object);
5252

53-
/* Deprecated - Use zend_ce_exception directly instead */
54-
ZEND_API zend_class_entry *zend_exception_get_default(void);
55-
56-
/* Deprecated - Use zend_ce_error_exception directly instead */
57-
ZEND_API zend_class_entry *zend_get_error_exception(void);
58-
5953
ZEND_API void zend_register_default_classes(void);
6054

6155
/* exception_ce NULL, zend_ce_exception, zend_ce_error, or a derived class

0 commit comments

Comments
 (0)