-
Notifications
You must be signed in to change notification settings - Fork 6
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
Get rid of reflection in ObjectSnapshot #37
Conversation
$reflProperty->setAccessible(true); | ||
$value = $reflProperty->getValue($object); | ||
foreach ($export as $property => $value) { | ||
$property = str_replace(["\x00*\x00", "\x00{$class}\x00"], '', $property); // not accessible properties |
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.
This will be always true ? Can this change in php 7 for example ?
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.
Yup. Afterall, the tests are passing with php7 and even hhvm, so... And this should not change IMo, it's been there as long as object support was there so...
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.
ok so let's go we will see in few year if it's still the case.
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.
weird. @Taluu where are you find this hack ?
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.
during a simple (array) $object
export :}
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.
and some other things can't remember which too (I think it was in the var_dumper component of symfony)
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.
Maybe I should check up with https://github.com/symfony/var-dumper/blob/master/Caster/Caster.php though, but then I would reintroduce some reflection...
Looks good |
Get rid of reflection in ObjectSnapshot
I'll merge that on master when I'll have some time |
It's also work with inherited attributes? |
Re-targeting of #34