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

Fix readme #74

Merged
merged 1 commit into from
Jul 11, 2019
Merged

Fix readme #74

merged 1 commit into from
Jul 11, 2019

Conversation

ajgarlag
Copy link
Contributor

No description provided.

@Toflar Toflar merged commit f566d39 into dunglas:master Jul 11, 2019
@Toflar
Copy link
Contributor

Toflar commented Jul 11, 2019

Thanks @ajgarlag!

@@ -249,9 +249,9 @@ As an example we use the Symfony `DateTimeNormalizer` service so we do have supp
```yaml
# Add DateTime Normalizer to Dunglas' Doctrine JSON ODM Bundle
dunglas_doctrine_json_odm.serializer:
class: Symfony\Component\Serializer\Serializer
Copy link
Contributor

Choose a reason for hiding this comment

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

I ran into the problem with autoconfigure feature here (which is enabled by default).
In default environment dunglas_doctrine_json_odm.serializer auto-tags as normalizer. This leads to the situation when default symfony's serializer uses dunglas_doctrine_json_odm.serializer instead of objectNormalizer. As a result you cant instantiate new objects through standard symfony serializer anymore.
To solve this just use autoconfigure: false.

arguments:
- ['@serializer.normalizer.datetime', '@dunglas_doctrine_json_odm.normalizer.object']
- ['@serializer.denormalizer.array', '@serializer.normalizer.datetime', '@serializer.normalizer.object']
Copy link
Contributor

@CvekCoding CvekCoding Jul 26, 2019

Choose a reason for hiding this comment

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

After PR #78 we have to use

- ['@dunglas_doctrine_json_odm.normalizer.array', '@serializer.normalizer.datetime', '@dunglas_doctrine_json_odm.normalizer.object']

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@CvekCoding Include these changes in #78, please.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ajgarlag done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants