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

expect callables instead of closures for hydrators/transformers #14

Merged
merged 1 commit into from
Feb 22, 2016
Merged

expect callables instead of closures for hydrators/transformers #14

merged 1 commit into from
Feb 22, 2016

Conversation

dimvic
Copy link
Contributor

@dimvic dimvic commented Feb 22, 2016

No description provided.

kocsismate added a commit that referenced this pull request Feb 22, 2016
expect callables instead of closures for hydrators/transformers
@kocsismate kocsismate merged commit 0f8d477 into woohoolabs:master Feb 22, 2016
@kocsismate
Copy link
Member

Really nice work! I love the callable[] parts in the docblocks as they make the interfaces way more clear. I'll do the rest of the work (updating the changelog, readme etc.) to prepare a release.

@dimvic
Copy link
Contributor Author

dimvic commented Feb 22, 2016

Thank you :)
I was about to suggest a release as 0.10.2 as well, so that I can configure my composer files to something other than dev-master again!

@kocsismate
Copy link
Member

Unfortunately I had to remove the call_user_func_array calls, because they failed some tests when arguments were passed to the hydrator by reference. It came out that this function can't handle passing by reference, but I want to keep this feature.

So I had to bring back the original $hydrator(...) function calls. After playing with them, it turned out that they could almost invoke all the types of callables, except of this one: "Class::staticFunction" (however HHVM can do it!). Could you accept the fact that callables in this form can't be used as hydrators?

@dimvic
Copy link
Contributor Author

dimvic commented Feb 24, 2016

It makes sense the way you put it, if you want to pass by reference just keep the closures, after all if you want to call a Class::staticFunction you can still do that by calling in inside the closure, it's not a big deal after all. I'm sorry for the time you had to waste on this!

@kocsismate
Copy link
Member

It was not too much time! Anyway, I have to investigate why the broken tests were not indicated on this page before accepting the PR. And I try to find out why PHP can't invoke the "Class::staticFunction" type of callables.

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

Successfully merging this pull request may close these issues.

2 participants