You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ReflectionMethod constructor should not find private parent method #9470
I'm at least the second person who didn't immediately realize it was a language change and not a bug,
maybe add information about it to the UPGRADE -> Backward Incompatible Changes?
@iluuu1994 While the commit includes it in NEWS, this change is still not mentioned in UPGRADING. This change could be considered breaking for certain projects, so I imagine raising visibility of the changed behaviour would be good.
I've already ran into one project which is affected by this in their test suite (Composer).
Their use-case: create a mock of a certain class, then access a private method on the original class for test purposes.
This is now broken on PHP 8.3 and I currently can't think of a straight-forward work-around for it either.
@usarise@jrfnl@sebastianbergmann FYI, we've discussed this briefly and decided to revert this change for now, given that this seems to break more code than I expected.
Activity
usarise commentedon Jun 9, 2023
I'm at least the second person who didn't immediately realize it was a language change and not a bug,
maybe add information about it to the UPGRADE -> Backward Incompatible Changes?
iluuu1994 commentedon Jun 22, 2023
@usarise Yes, I usually add the note just before merging (because rebasing loses it, due to our git merge policy). That's why it's not in the PR diff.
jrfnl commentedon Aug 28, 2023
@iluuu1994 While the commit includes it in
NEWS, this change is still not mentioned inUPGRADING. This change could be considered breaking for certain projects, so I imagine raising visibility of the changed behaviour would be good.I've already ran into one project which is affected by this in their test suite (Composer).
Their use-case: create a mock of a certain class, then access a private method on the original class for test purposes.
This is now broken on PHP 8.3 and I currently can't think of a straight-forward work-around for it either.
https://3v4l.org/8YcIk/rfc#vgit.master
iluuu1994 commentedon Aug 28, 2023
@jrfnl Thanks for the heads-up. We usually only add bugs to NEWS, but given that it broke your use case I will add it to UPGRADING.
jrfnl commentedon Aug 28, 2023
@iluuu1994 Thanks!
usarise commentedon Aug 28, 2023
@jrfnl straight-forward work-around:
replace
with
jrfnl commentedon Aug 28, 2023
Thanks @usarise !
iluuu1994 commentedon Sep 1, 2023
@usarise @jrfnl @sebastianbergmann FYI, we've discussed this briefly and decided to revert this change for now, given that this seems to break more code than I expected.
jrfnl commentedon Sep 1, 2023
@iluuu1994 Thanks for letting us know.
fix ReflectionMethod with php8.3 in MicroKernelTrait
fix ReflectionMethod with php8.3 in MicroKernelTrait
fix ReflectionMethod with php8.3 in MicroKernelTrait
iluuu1994 commentedon Sep 5, 2023
FYI #12127. At least this behavior is tested now. 🙂
sebastianbergmann commentedon Nov 7, 2023
AFAICS, the NEWS entry was not reverted and is still there: https://github.com/php/php-src/blob/85cb0816615140afdff89e3bb37f5bcb6bca586b/NEWS