Skip to content

Remove old exception class getters #19043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions UPGRADING.INTERNALS
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 0 additions & 14 deletions Zend/zend_exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 0 additions & 6 deletions Zend/zend_exceptions.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down