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

Added guzzle timeout and connect timeout in bundle configuration. #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Micsou
Copy link

@Micsou Micsou commented Feb 8, 2017

No description provided.

@dunglas
Copy link
Member

dunglas commented Feb 8, 2017

What do you think of allowing to configure the Guzzle client to use (make the service name of the Guzzle client to inject) configurable instead?

It will allow the user to change all Guzzle settings only of only those 2 ones.

@coveralls
Copy link

coveralls commented Feb 8, 2017

Coverage Status

Coverage decreased (-17.4%) to 82.609% when pulling 13311df on Micsou:feature/configure-guzzle-timeout into 1942fb5 on coopTilleuls:master.

@Micsou
Copy link
Author

Micsou commented Feb 8, 2017

I don't really know how to do that but I'll search for...
If you have any track... !?

@dunglas
Copy link
Member

dunglas commented Feb 8, 2017

You can do it directly in the extension:

  1. create a guzzle_client configuration key taking a service name as value
  2. in the extension, if this configuration key is set, add this service as argument of the coop_tilleuls_ovh.api definition (something like $container->getDefinition('coop_tilleuls_ovh.api')->addArgument($config['guzzle_client']);

It should to the trick.

The the user can define a custom service in its app and set its name in the config. The bundle will automatically use it.

@coveralls
Copy link

Coverage Status

Coverage decreased (-22.7%) to 77.273% when pulling 7112745 on Micsou:feature/configure-guzzle-timeout into 1942fb5 on coopTilleuls:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-22.7%) to 77.273% when pulling 7112745 on Micsou:feature/configure-guzzle-timeout into 1942fb5 on coopTilleuls:master.

@Micsou
Copy link
Author

Micsou commented Feb 8, 2017

I've tried to do so but not really satisfied of myself...
I'm not familiar to define services in xml files and feel a bit outperformed....
I'll take all advices you'll send me ;)
Hope it can be anyway something that can help...
And another apology... tests are broken.
Will have a look on that tomorrow.

@coveralls
Copy link

coveralls commented Feb 9, 2017

Coverage Status

Coverage decreased (-13.04%) to 86.957% when pulling 876ab71 on Micsou:feature/configure-guzzle-timeout into 1942fb5 on coopTilleuls:master.

@Micsou
Copy link
Author

Micsou commented Feb 9, 2017

Kevin,
I think i succeeded using an alias for the optionnal guzzle client service passed as parameter.
Hope that's not too nasty.
Unfortunatly, i d'ont know how to write test on my optionnal parameter... so coverage decreased. If you want to have a look on that or tell me what to do.
Thx

@dunglas
Copy link
Member

dunglas commented Jun 4, 2018

Looks good to me, can you add a test please?

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