Skip to content

Replace plugins package with client-common #72

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 2 commits into from
May 19, 2016
Merged

Replace plugins package with client-common #72

merged 2 commits into from
May 19, 2016

Conversation

sagikazarmark
Copy link
Member

@sagikazarmark sagikazarmark commented May 4, 2016

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? yes
Documentation if this is a new feature, link to pull request in https://github.com/php-http/documentation that adds relevant documentation
License MIT

What's in this PR?

Replaces php-http/plugins with php-http/common-client.

Why?

The plugins package has been deprecated and moved to client-common.

Checklist

  • Updated CHANGELOG.md to describe BC breaks / deprecations | new feature | bugfix

@sagikazarmark
Copy link
Member Author

If one of the three separated plugins are not installed, then any configuration that specifically enables those plugins will end up in a BC break. So I think we have to install the plugins package as well, and replace the used class if the package is installed.

@@ -19,6 +19,7 @@
"php": ">=5.5",
"php-http/client-implementation": "^1.0",
"php-http/message-factory": "^1.0.2",
"php-http/client-common": "^1.1",
"php-http/plugins": "^1.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

if we require both the new and the old plugins now, we don't need the flexible code you introduce above.

but i think to avoid BC breaks, we can indeed depend on both.

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah sorry, i was confused. what you do is for the plugins that are now separate you use the new one if are available and otherwise keep using the old one. i think that is fine. once we move to 2.0 the separate plugins will only be available if included.

Copy link
Member Author

Choose a reason for hiding this comment

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

Exactly.

@dbu
Copy link
Collaborator

dbu commented May 9, 2016

looks good. i suggest we bump the composer alias for master to 1.1-dev so that we release this as a new minor version. together with the other fix i started preparing.

@sagikazarmark
Copy link
Member Author

sagikazarmark commented May 9, 2016

Why not 1.2-dev then?

@sagikazarmark
Copy link
Member Author

Squashed commits. Anything else here @dbu?

@@ -137,6 +138,9 @@ private function configurePluginByName($name, Definition $definition, array $con
{
switch ($name) {
case 'cache':
if (class_exists('Http\Client\Common\Plugin\CachePlugin')) {
Copy link
Member

Choose a reason for hiding this comment

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

I would prefer a comment here that says why your are doing this. It seams kind of weird if you do not know that one namespace was deprecated and you are doing this because we want to keep BC.

Same with the logger and stopwatch.

Copy link
Member Author

Choose a reason for hiding this comment

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

Great idea, thanks, will do that.

@sagikazarmark sagikazarmark force-pushed the plugins branch 2 times, most recently from 561d2df to de3388c Compare May 14, 2016 15:49
@Nyholm
Copy link
Member

Nyholm commented May 14, 2016

👍


- **[BC] PluginClientFactory returns an instance of `Http\Client\Common\PluginClient`** (see [php-http/client-common#14](https://github.com/php-http/client-common/pull/14))
- Plugins are loaded from their new packages, fall back to `php-http/plugins` if necessary

Copy link
Collaborator

Choose a reason for hiding this comment

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

should we say that version 2 of the bundle will not automatically require the plugins that moved to separate repositories? i am not sure if we want to do that actually - cache, logger and stopwatch all depend on things that symfony depends on anyways, so there is no cost in requiring them in the bundle, right? maybe we even want to explicitly require those new plugins rather than the BC repository.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am fine with that as well. In that case, we don't need to rely on the old package.

@dbu
Copy link
Collaborator

dbu commented May 18, 2016

needs a rebase

Applied fixes from StyleCI

Add plugins dependency back as fallback

Remove auto (default) config from plugins

Update changelog

Make sure to use a plugin version with correct interface
@sagikazarmark
Copy link
Member Author

Added a separate commit for plugin package removal.

Blocked by php-http/stopwatch-plugin#1

@dbu
Copy link
Collaborator

dbu commented May 19, 2016

https://github.com/php-http/stopwatch-plugin/releases/tag/1.0.1

i restarted the build, lets see if its fixed with this

@sagikazarmark
Copy link
Member Author

sagikazarmark commented May 19, 2016

Dont forget to set the lowest version for the plugin.

@dbu
Copy link
Collaborator

dbu commented May 19, 2016

do you mean stopwatch? composer will figure that out i think.

@sagikazarmark
Copy link
Member Author

Symfony 3 will not work with 1.0 as the lowest version

David Buchmann notifications@github.com ezt írta (2016. május 19.,
csütörtök):

do you mean stopwatch? composer will figure that out i think.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#72 (comment)

@dbu
Copy link
Collaborator

dbu commented May 19, 2016 via email

@sagikazarmark
Copy link
Member Author

Ok

@sagikazarmark
Copy link
Member Author

Merge and tag 1.1?

@dbu dbu merged commit b311293 into master May 19, 2016
@dbu dbu deleted the plugins branch May 19, 2016 10:05
@dbu
Copy link
Collaborator

dbu commented May 19, 2016 via email

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.

4 participants