-
-
Notifications
You must be signed in to change notification settings - Fork 64
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
Fix readme #74
Conversation
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 |
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.
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'] |
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.
After PR #78 we have to use
- ['@dunglas_doctrine_json_odm.normalizer.array', '@serializer.normalizer.datetime', '@dunglas_doctrine_json_odm.normalizer.object']
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.
@CvekCoding Include these changes in #78, please.
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.
@ajgarlag done
No description provided.