Skip to content

Conversation

DanielEScherzer
Copy link
Member

@DanielEScherzer DanielEScherzer commented Jul 5, 2025

@TimWolla
Copy link
Member

Is this waiting for #18817?

@DanielEScherzer
Copy link
Member Author

Yes, I was planning to have #18817 merged first

Copy link
Member

@iluuu1994 iluuu1994 left a comment

Choose a reason for hiding this comment

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

Only superficial comments, looks correct to me otherwise.

Copy link
Member

@TimWolla TimWolla left a comment

Choose a reason for hiding this comment

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

Mainly remarks about the test organization. For my attribute RFCs, I've tried to very carefully maintain the test infrastructure with regard to titles and filenames.

@@ -2006,6 +2006,27 @@ ZEND_API ZEND_COLD void ZEND_FASTCALL zend_deprecated_constant(const zend_consta
zend_string_release(message_suffix);
}

ZEND_API ZEND_COLD void zend_use_of_deprecated_trait(
zend_class_entry *trait,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
zend_class_entry *trait,
const zend_class_entry *trait,

Copy link
Member Author

Choose a reason for hiding this comment

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

Can't do that without more widespread changes, trait gets passed to get_deprecation_suffix_from_attribute() which does not const its parameter, because it gets passed to zend_get_attribute_object() where the parameter isn't const, etc.

Copy link
Member

Choose a reason for hiding this comment

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

I see, the rabbit hole goes deep. We should constify the scope down the change as a follow-up / sibling PR then, similarly to #19156 which was found during clone-with.

Copy link
Member

Choose a reason for hiding this comment

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

I'm just having a look, and this rabbit hole goes very deep, as it requires adding const qualifiers for various AST functions.

@TimWolla
Copy link
Member

TimWolla commented Aug 21, 2025

Note: I've seen the new review request, but am currently busy. I'll try to get to that early next week at the latest.

Copy link
Member

@TimWolla TimWolla left a comment

Choose a reason for hiding this comment

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

Okay, except for tests, but okay with doing that as a follow-up if necessary to make the cut for Beta 2.

@TimWolla TimWolla dismissed their stale review August 24, 2025 11:10

Important points are resolved. Soft-LGTM.

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.

4 participants