Skip to content

Fix variable name #12180

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

Merged
merged 1 commit into from
Aug 16, 2019
Merged

Fix variable name #12180

merged 1 commit into from
Aug 16, 2019

Conversation

makmaoui
Copy link
Contributor

No description provided.

@OskarStark OskarStark added this to the 4.3 milestone Aug 16, 2019
@OskarStark
Copy link
Contributor

Hi 👋

First of all: your change looks correct, also the target branch 👍

There were a lot of changes around this variable in the last time:

However I don't now why we should name it $dateCallback, I prefer $callback (in the whole example of course).

@wouterj is there any reason I can get, to name it $dateCallback?

@makmaoui
Copy link
Contributor Author

Hi @OskarStark ,

Thanks for your reply, i propose this change especially to make example working. Actually the variable name isn't the same at creation ($callback) and at use ($dateCallback).

I choose to keep the "use" version ($dateCallback) because i consider it more descriptive but that's not the main purpose of my PR.

@wouterj
Copy link
Member

wouterj commented Aug 16, 2019

I agree with the $dateCallback naming: It's a serializer callback specifically for the Date object. I'm not sure why it's not directly provided as argument (instead of using a variable), but I guess that has to do with the large amount of parameters it has.

So let's merge :) Thanks @makmaoui for fixing the code examples!

wouterj added a commit that referenced this pull request Aug 16, 2019
This PR was merged into the 4.3 branch.

Discussion
----------

Fix variable name

<!--

If your pull request fixes a BUG, use the oldest maintained branch that contains
the bug (see https://symfony.com/roadmap for the list of maintained branches).

If your pull request documents a NEW FEATURE, use the same Symfony branch where
the feature was introduced (and `master` for features of unreleased versions).

-->

Commits
-------

fb57b76 Fix variable name
@wouterj wouterj merged commit fb57b76 into symfony:4.3 Aug 16, 2019
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.

4 participants