Skip to content

Fix ProfileClient creation with callable factory #152

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
Apr 19, 2017
Merged

Fix ProfileClient creation with callable factory #152

merged 1 commit into from
Apr 19, 2017

Conversation

fbourigault
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets N/A
Documentation N/A
License MIT

The ProfileClientFactory added in #136 was not tested and contained an error while decorating a callable factory. This is now fixed with tests.

@fbourigault fbourigault added this to the Version 1.5.0 milestone Apr 19, 2017
@Nyholm Nyholm requested a review from hannesvdvreken April 19, 2017 11:44
Copy link
Member

@Nyholm Nyholm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good!

I had just a smaller comment


public function testCreateClientFromCallable()
{
$factory = function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a argument here to make sure call_user_func passes an argument

@fbourigault
Copy link
Contributor Author

Fixed!

@fbourigault fbourigault merged commit 7b5bdf7 into php-http:master Apr 19, 2017
@fbourigault fbourigault deleted the fix-profile-client-factory branch April 19, 2017 21:31
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.

3 participants