-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Serializer] ObjectNormalizer: don't serialize static methods and props #16546
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
Conversation
dunglas
commented
Nov 14, 2015
Q | A |
---|---|
Bug fix? | yes |
New feature? | no |
BC breaks? | no |
Deprecations? | no |
Tests pass? | yes |
Fixed tickets | #16485 |
License | MIT |
Doc PR | n/a |
Maybe should I open another PR for the PropertyAccess Component to prevent it from trying to access static methods/properties? |
@@ -66,8 +66,9 @@ public function normalize($object, $format = null, array $context = array()) | |||
|
|||
// methods | |||
$reflClass = new \ReflectionClass($object); | |||
foreach ($reflClass->getMethods(\ReflectionMethod::IS_PUBLIC) as $reflMethod) { | |||
foreach ($reflClass->getMethods(\ReflectionMethod::IS_PUBLIC ) as $reflMethod) { |
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.
wrong cs change
CS fixed. Travis failure is not related. |
ping @symfony/deciders |
yeah thanks @dunglas to take seriously my problem! |
makes sense to me |
👍 Status: Reviewed |
👍 |
Thank you @dunglas. |
…ods and props (dunglas) This PR was squashed before being merged into the 2.7 branch (closes #16546). Discussion ---------- [Serializer] ObjectNormalizer: don't serialize static methods and props | Q | A | ------------- | --- | Bug fix? | yes | New feature? |no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #16485 | License | MIT | Doc PR | n/a Commits ------- 1fab27b [Serializer] ObjectNormalizer: don't serialize static methods and props