Skip to content

[Serializer] make datetime_format configurable in config.yml #19456

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

Closed
wants to merge 1 commit into from
Closed

[Serializer] make datetime_format configurable in config.yml #19456

wants to merge 1 commit into from

Conversation

DavidBadura
Copy link
Contributor

Q A
Branch? master
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

with this change, you can configure globaly the datetime format for the datetime normilizer in your config.yml

framework:
    serializer:
        enabled: true
        datetime_format: "d-m-Y"

@dunglas
Copy link
Member

dunglas commented Jul 29, 2016

Can you add a test for this new feature?

@nicolas-grekas
Copy link
Member

I this really a good idea? If some bundle expects some default (the only possible one today), then changing this option would break it. Or did I miss something?

@ro0NL
Copy link
Contributor

ro0NL commented Aug 9, 2016

Although this looks convenient... i tend to agree with @nicolas-grekas. This can get problematic, for the serializer service being a one-size-fits-all serializer. On the other hand, maybe the real problem is bundles/etc. depend on a serializer they make assumptions about.

@nicolas-grekas
Copy link
Member

👎 for the reason above

@fabpot
Copy link
Member

fabpot commented Aug 23, 2016

Agree as well

@fabpot fabpot closed this Aug 23, 2016
@DavidBadura DavidBadura deleted the serializer-datetime-format-config branch September 17, 2016 12: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.

6 participants