Skip to content

Conversation

nielsdos
Copy link
Member

@nielsdos nielsdos commented Sep 5, 2025

When deprecation causes an exception, we should return NULL instead of continuing.

…essing a deprecated constant

When deprecation causes an exception, we should return NULL instead of
continuing.
Copy link
Member

@DanielEScherzer DanielEScherzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For 8.4 we should have a test with E_STRICT so that it can be run without needing zend_test, and for 8.5 we would then also be able to confirm that the attributes don't mess with things, but the extra test can be done as a follow-up after this gets merged

@nielsdos
Copy link
Member Author

nielsdos commented Sep 5, 2025

For 8.4 we should have a test with E_STRICT so that it can be run without needing zend_test, and for 8.5 we would then also be able to confirm that the attributes don't mess with things, but the extra test can be done as a follow-up after this gets merged

The fact that it can use attributes is not really relevant. The ZEND_ACC flag matters, not how it was set.
I prefer to just test this via zend_test, sure we can test via E_STRICT but once E_STRICT is removed we would be forced to change the test again to use a different constant in the test.

@nielsdos nielsdos closed this in 9d69ab9 Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Assertion failure when error handler throws when accessing a deprecated constant

2 participants