-
Notifications
You must be signed in to change notification settings - Fork 8k
Zend: Add zend_class_use_internal_traits() for internal classes #20976
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
base: master
Are you sure you want to change the base?
Conversation
|
@khaledalam This is fantastic, thank you for your work. Your efficiency is truly remarkable—new code commits in just a few hours. The support for trait features will help us utilize more advanced design patterns in extensions and break free from the limitations of single inheritance. |
iluuu1994
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While testing I noticed various things missing, and pushed the missing pieces. The test passes now.
Just out of interested, did you make the changes by hand or via AI?
Thanks for the fixes. I did the changes myself by hand, with some occasional AI help. |
Thanks, @matyhtf I appreciate it. And thank you for the thoughtful suggestion as well. |
|
Ah, the test immediately crashed in CI and on my machine, so I was wondering how most of your code works if you couldn't test it, but I realize now it didn't crash for you because you didn't use address sanitizer. Nice work! You can use sanitizer with |
Description
Extensions can register internal classes, but currently there is no supported ZendAPI to apply Traits to those classes.
This PR introduces
zend_class_use_traits()to allow internal classes to use Traits.Fix #20974