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

Config file jms_serializer.yaml ignored #936

Open
Fly06-Fr opened this issue Aug 30, 2023 · 2 comments
Open

Config file jms_serializer.yaml ignored #936

Fly06-Fr opened this issue Aug 30, 2023 · 2 comments

Comments

@Fly06-Fr
Copy link

I wanted to pass some options to the json serializer and realised that my config file content was just not taken into account.

To reproduce the issue create a file named jms_serializer.yaml with the following content:

jms_serializer:
    visitors:
        json:
            options: [JSON_UNESCAPED_UNICODE] 

Save your file and check the bundle config file with the symfony console:

php bin/console debug:config jms_serializer

Current configuration for extension with alias "jms_serializer"
===============================================================

jms_serializer:
    visitors:
        json:
            options: 1216

It should be 256 instead of 1216.

Versions:

  • symfony: 3.4.0
  • jms/serializer-bundle: 2.4.4

Just wanted to know if this problem has been addressed and hopefully fixed in some recent version of the bundle?

Thanks.

@scyzoryck
Copy link
Collaborator

Hi.
It looks more like an problem with symfony config. Are you sure that your file is loaded by symfony?

Best scyzoryck

@Fly06-Fr
Copy link
Author

Hello,
The file is loaded but the content is not merged with the default settings.
I also check with another bundle (fosrestbundle) and the output of the "php bin/console debug:config fos_rest" is in sync with the content of the bundle config file (fos_rest.yaml).
So it appears to be specific to jms_serializer, not to symfony.
Thanks.

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

No branches or pull requests

2 participants