-
Notifications
You must be signed in to change notification settings - Fork 39
Add Formatter::formatResponseForRequest() #146
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
Conversation
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.
looks good to me.
@Nyholm wdyt?
there is some code rot going on with php 8 and phpstan, but thats not related to the PR.
Im happy with this. But this will only have a "real" effect in v2. Currently v2 is not planned. Introducing a new interface would make more sense and would make this change "real" now. I see that it was discussed in #145 |
i will update at least logger plugin as such, using method_exsists trick till v2. im still not convinced we need moar interfaces :') |
aparently this is the symfony way of "adding" methods to interfaces without breaking BC. the consumer would have to use method_exists as i understood |
this is my personal preference though, as it's more easy to discover than a new contract IMHO. for consumers methods_exists+ which raises the question, what new contract would we add? |
I dont have any strong feelings. I do like the "symfony way". But that only works well because Symfony always has a next major version planned. Im happy with the PR in the current state if @ro0NL is happy. (Given the fact that it might never be a version 2 coming up) |
|
no worries, im playing chess on 2 boards ;) symfony/symfony#45358 |
about deprecating formatResponse(): #145 (comment) i think it makes sense 👍 ideally there's 1 responsible method for response formatting. Let me know if should be part of this PR. |
if we do the new method on the same interface, i would indeed deprecate the old formatResponse method. and best to this in the same MR. |
thanks! i will see if we can get the build to green again, that would be good to see before tagging the release. |
During 1.x lifecycle:
Next major release should add the method for real.