Skip to content

Conversation

@fbourigault
Copy link
Contributor

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Related tickets fixup #71
Documentation n/a
License MIT

In #71, I missed to remove the client_name option from the options array before using it as PluginClient constructor third argument.

Before choosing to use unset, I was thinking to add the client_name option to PluginClient, use the OptionsResolver to set a default client name and add a getter to retrieve the client name. I don't choosed this way to not change anything in PluginClient, but if you find this solution better than the unset one, I would be happy to update this PR.

@Nyholm
Copy link
Member

Nyholm commented Jul 10, 2017

Why do we need to remove it?

@fbourigault
Copy link
Contributor Author

To avoid the following exception:
Symfony\Component\OptionsResolver\Exception\UndefinedOptionsException: The option "client_name" does not exist. Defined options are: "debug_plugins", "max_restarts".

@Nyholm
Copy link
Member

Nyholm commented Jul 10, 2017

Oh, I thought the option resolver nicely ignored that...

Thank you.

@Nyholm Nyholm merged commit 52b1c26 into php-http:master Jul 10, 2017
@fbourigault fbourigault deleted the fix-plugin-client-factory branch July 10, 2017 21:11
@fbourigault
Copy link
Contributor Author

Thank you for merging!

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