Skip to content

Conversation

localheinz
Copy link
Contributor

@localheinz localheinz commented Jun 21, 2019

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Related tickets related to #346
Documentation php-http/documentation#268
License MIT

What's in this PR?

This PR

  • adds the tag 'httplug.client' to clients created by the HttplugExtension

Why?

This would allow fetching services by tag and replacing them, for example, with a concrete Mock\Client, without having to know the exact service identifier.

Checklist

  • Updated CHANGELOG.md to describe BC breaks / deprecations | new feature | bugfix
  • Documentation pull request created (if not simply a bugfix)

Copy link
Collaborator

@dbu dbu left a comment

Choose a reason for hiding this comment

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

seems like a good idea to me.

@@ -419,6 +419,7 @@ function ($id) {
->addArgument([
'client_name' => $clientName,
])
->addTag('httplug.client')
Copy link
Collaborator

Choose a reason for hiding this comment

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

i'd make this a public constant so that things using the tag can use it explicitly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adjusted!

I'll update the documentation as well.

@localheinz localheinz force-pushed the feature/tag branch 2 times, most recently from 1f7d439 to f92cd2a Compare June 21, 2019 17:10
@localheinz localheinz force-pushed the feature/tag branch 2 times, most recently from 074bc0e to aa0102d Compare June 21, 2019 18:04
Copy link
Collaborator

@dbu dbu left a comment

Choose a reason for hiding this comment

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

can you please rebase this on master? there is a conflict, i guess its about the changelog file...

@localheinz
Copy link
Contributor Author

@dbu

Rebased!

@dbu dbu merged commit 1f28ecc into php-http:master Jul 5, 2019
@localheinz localheinz deleted the feature/tag branch July 5, 2019 08:24
@localheinz
Copy link
Contributor Author

Thank you, @dbu!

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