Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Not compatible with Symfony 3's Controller::json() #663

Closed
ReSpawN opened this issue Oct 27, 2016 · 5 comments
Closed

Not compatible with Symfony 3's Controller::json() #663

ReSpawN opened this issue Oct 27, 2016 · 5 comments

Comments

@ReSpawN
Copy link

ReSpawN commented Oct 27, 2016

The JMS bundle expects 3 arguments of which the 3rd being a Context instance, wheras Symfony submits the context as a 4th.

@goetas
Copy link
Collaborator

goetas commented Oct 28, 2016

This is a symfony issue.
https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php#L118 is expecting to have a symfony serializer instance, not a JMS serializer.

I suggest you to open the issue on the symfony repo.

@goetas goetas closed this as completed Oct 28, 2016
@goetas
Copy link
Collaborator

goetas commented Oct 28, 2016

see symfony/symfony#17642

@ReSpawN
Copy link
Author

ReSpawN commented Oct 28, 2016

Perhaps I might misunderstand, but seeing this is an extension for Symfony, isn't that the job for the developers of the actual extension? It's expecting an interface, which is easily extended from the Symfony serializer class.

Fortunately somebody beat me to it so I guess the issue will be fixed shortly.

Thanks for the reply goetas.

@goetas
Copy link
Collaborator

goetas commented Oct 28, 2016

This is not the official symfony serializer (even if probably is the most popular).
Is a standalone serializer that can be integrated in almost any php project (some examples https://packagist.org/packages/jms/serializer/dependents)

@ReSpawN
Copy link
Author

ReSpawN commented Oct 28, 2016

I know, I've been using it standalone in other projects. :) Simply pointing out that if you make an extension for another project as a purpose (in example, the bundle) it should be compatible. :)

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

No branches or pull requests

2 participants