Zend: Add zend_class_use_internal_traits() for internal classes#20976
Zend: Add zend_class_use_internal_traits() for internal classes#20976khaledalam wants to merge 13 commits intophp:masterfrom
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.
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 |
This reverts commit 7f0101b.
|
There are no syntax changes at the PHP level in this PR, and the ABI is also stable with no changes. It's just an addition of a lower-level function that doesn't affect the core in any way. Could you please merge it into the master branch as soon as possible? Thanks very much. |
|
Given this will only land on master, I don't think there's a rush. But I'll try to have a look again soon. |
|
Thanks for the fixes. |
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