{"action":"created","issue":{"url":"https://api.github.com/repos/php-http/HttplugBundle/issues/112","repository_url":"https://api.github.com/repos/php-http/HttplugBundle","labels_url":"https://api.github.com/repos/php-http/HttplugBundle/issues/112/labels{/name}","comments_url":"https://api.github.com/repos/php-http/HttplugBundle/issues/112/comments","events_url":"https://api.github.com/repos/php-http/HttplugBundle/issues/112/events","html_url":"https://github.com/php-http/HttplugBundle/pull/112","id":169790854,"number":112,"title":"Allow to configure plugins specifically for a client","user":{"login":"dbu","id":76576,"avatar_url":"https://avatars.githubusercontent.com/u/76576?v=3","gravatar_id":"","url":"https://api.github.com/users/dbu","html_url":"https://github.com/dbu","followers_url":"https://api.github.com/users/dbu/followers","following_url":"https://api.github.com/users/dbu/following{/other_user}","gists_url":"https://api.github.com/users/dbu/gists{/gist_id}","starred_url":"https://api.github.com/users/dbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbu/subscriptions","organizations_url":"https://api.github.com/users/dbu/orgs","repos_url":"https://api.github.com/users/dbu/repos","events_url":"https://api.github.com/users/dbu/events{/privacy}","received_events_url":"https://api.github.com/users/dbu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/php-http/HttplugBundle/labels/in%20progress","name":"in progress","color":"EAC04F"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2016-08-07T10:50:07Z","updated_at":"2016-08-12T14:15:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/php-http/HttplugBundle/pulls/112","html_url":"https://github.com/php-http/HttplugBundle/pull/112","diff_url":"https://github.com/php-http/HttplugBundle/pull/112.diff","patch_url":"https://github.com/php-http/HttplugBundle/pull/112.patch"},"body":"| Q               | A\r\n| --------------- | ---\r\n| Bug fix?        | no\r\n| New feature?    | yes\r\n| BC breaks?      | no\r\n| Deprecations?   | no\r\n| Related tickets | fixes #110\r\n| Documentation   | https://github.com/php-http/documentation/pull/142\r\n| License         | MIT\r\n\r\n\r\n#### What's in this PR?\r\n\r\nAdd new configuration for plugins specifically to a client. The global plugin configuration is duplicated to allow configuring all plugins with client specific information.\r\n\r\n#### Why?\r\n\r\nSee #110\r\n\r\n\r\n#### Example Usage\r\n\r\n``` yaml\r\nhttplug:\r\n    plugins:\r\n        logger:\r\n            enabled: true\r\n            logger: 'logger'\r\n            formatter: null\r\n        redirect:\r\n            enabled: true\r\n            preserve_header: true\r\n            use_default_for_multiple: true\r\n        retry:\r\n            enabled: true\r\n            retry: 1\r\n    clients:\r\n        todo:\r\n            factory: \"httplug.factory.guzzle6\"\r\n            plugins:\r\n                - 'httplug.plugin.logger'\r\n                - 'httplug.plugin.redirect'\r\n                -  add_host:\r\n                     host: http://localhost\r\n                - 'httplug.plugin.retry'\r\n        acme:\r\n            factory: 'httplug.factory.guzzle6'\r\n            plugins: ['httplug.plugin.redirect', 'httplug.plugin.retry']\r\n```\r\n\r\nYou can specify the httplug.client.{name}.plugin.add_host in the plugins list if you want the host plugin to come somewhere else than last in the chain.\r\n\r\n#### Checklist\r\n\r\n- [x] Updated CHANGELOG.md to describe BC breaks / deprecations | new feature | bugfix\r\n- [x] Add the other plugins we currently dont support (want feedback first)\r\n  - [x] HeaderSet\r\n  - [x] HeaderRemove\r\n  - [x] HeaderDefaults \r\n  - [x] HeaderAppend\r\n  - [x] -ContentLength- (configured as shared plugin, has no options)\r\n- [x] Handle custom authentication plugin\r\n- [x] Fix XML configuration\r\n- [x] Documentation pull request created => https://github.com/php-http/documentation/pull/142\r\n"},"comment":{"url":"https://api.github.com/repos/php-http/HttplugBundle/issues/comments/239457711","html_url":"https://github.com/php-http/HttplugBundle/pull/112#issuecomment-239457711","issue_url":"https://api.github.com/repos/php-http/HttplugBundle/issues/112","id":239457711,"user":{"login":"Nyholm","id":1275206,"avatar_url":"https://avatars.githubusercontent.com/u/1275206?v=3","gravatar_id":"","url":"https://api.github.com/users/Nyholm","html_url":"https://github.com/Nyholm","followers_url":"https://api.github.com/users/Nyholm/followers","following_url":"https://api.github.com/users/Nyholm/following{/other_user}","gists_url":"https://api.github.com/users/Nyholm/gists{/gist_id}","starred_url":"https://api.github.com/users/Nyholm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Nyholm/subscriptions","organizations_url":"https://api.github.com/users/Nyholm/orgs","repos_url":"https://api.github.com/users/Nyholm/repos","events_url":"https://api.github.com/users/Nyholm/events{/privacy}","received_events_url":"https://api.github.com/users/Nyholm/received_events","type":"User","site_admin":false},"created_at":"2016-08-12T14:15:08Z","updated_at":"2016-08-12T14:15:08Z","body":"I've started tested it a little. Found a unrelated bug... (#121)\r\n\r\nI'll will try to do a final review tonight if you are happy with the current state of this PR."}}
{"actor":{"display_login":"Nyholm"}}