Skip to content
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

[Serializer] ObjectNormalizer: don't serialize static methods and props #16546

Closed
wants to merge 2 commits into from

Conversation

dunglas
Copy link
Member

@dunglas 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

@dunglas
Copy link
Member Author

dunglas commented Nov 14, 2015

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) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong cs change

@dunglas
Copy link
Member Author

dunglas commented Nov 14, 2015

CS fixed. Travis failure is not related.

@dunglas
Copy link
Member Author

dunglas commented Nov 17, 2015

ping @symfony/deciders

@etiennerunge
Copy link

yeah thanks @dunglas to take seriously my problem!

@stof
Copy link
Member

stof commented Nov 17, 2015

makes sense to me

@Tobion
Copy link
Member

Tobion commented Nov 17, 2015

👍

Status: Reviewed

@xabbuh
Copy link
Member

xabbuh commented Nov 17, 2015

👍

@fabpot
Copy link
Member

fabpot commented Nov 17, 2015

Thank you @dunglas.

@fabpot fabpot closed this Nov 17, 2015
fabpot added a commit that referenced this pull request Nov 17, 2015
…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
@fabpot fabpot mentioned this pull request Nov 23, 2015
This was referenced Nov 30, 2015
@dunglas dunglas deleted the fix_16485 branch December 5, 2015 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants