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

Adapter packages #104

Closed
hannesvdvreken opened this Issue Apr 24, 2015 · 33 comments

Comments

Projects
None yet
5 participants
@hannesvdvreken

hannesvdvreken commented Apr 24, 2015

Hi,

In case you noticed: you depend on a lot of "stable" packages that have few dependencies of their own.

https://github.com/egeloen/ivory-http-adapter/tree/master/src

This package is a helper package for other tools like SDKs, OAuth clients, ...
So it should be stable as well.

How stable is this package?

The problem is, this package is equally unstable as all of your dependencies together. When one of these dependencies gets a new backwards incompatible release, you will need to update your package and publish a new major release in order to provide it. Imagine maintaining that.

Solution

What you can do is create a new GitHub organisation, and migrate this package over there. Then start creating new repositories in that organisation, one for every adapter class. Each repository will contain one adapter class and a bunch of peripheral files like composer.json, .gitattributes, ...

Consider creating a base adapter package repository, which you can clone, fill and push up to a new repository.

What depends on what?

The core package depends on nothing. Thus it is extremely stable!

The adapter packages depend on the core package (because that one contains the adapter interface and traits etc). Every adapter package also possibly depends on an external HTTP client, like Guzzle, or Buzz. But the amount of dependencies per package is maximum 2 or 3.

Suggest

When an adapter is extracted, the core package can suggest using one of the extracted adapter packages using the suggest field in composer.json.

What happens when Buzz releases a new major version?

You can update the buzz adapter package and release a new major version. People who are not using buzz and the buzz adapter package don't have to do anything. People using the old buzz http client can still use the old version of the buzz adapter package. You can even match the version with its external dependency, but I'd advise against it.

What happens when the core package makes a Backwards incompatible change?

It depends.
The core package needs to update major version number.

All adapter packages as well, because they need to publish a new release which can work with the new version of the core package. If the adapter interface and all of the traits remain backwards compatible, you might be able to get away with new bug releases for all adapter packages which also allow the new major version releases in their composer.json files.

Upgrade path?

This package is currently at version 0.7.1. By gradually extracting the adapters, you can work towards a 1.0.0. This v1 version will incredibly stable. If you don't have the time to do all the work at once, you could create a 0.8.0 release which has abstracted only one adapter.

@hannesvdvreken

This comment has been minimized.

Show comment
Hide comment
@hannesvdvreken

hannesvdvreken Apr 24, 2015

just to be clear: I love your work. I hope we can maybe even work together to make this a reality.

hannesvdvreken commented Apr 24, 2015

just to be clear: I love your work. I hope we can maybe even work together to make this a reality.

@egeloen

This comment has been minimized.

Show comment
Hide comment
@egeloen

egeloen Apr 24, 2015

Owner

I like the idea! I must admit since we were in a pre-release phase I didn't take care of the bullshit it will become when I will release the very first stable version and how I would be able to keep the BC... I would like to finish some work before doing it, so, IMO, I will release the 0.8 version with these updates and then, I will move everything to a new organization in order to follow your proposal!

Obviously any help is welcome /cc @sagikazarmark @jeromegamez :) Now, my first question is what would be the best name for this new organization?

Owner

egeloen commented Apr 24, 2015

I like the idea! I must admit since we were in a pre-release phase I didn't take care of the bullshit it will become when I will release the very first stable version and how I would be able to keep the BC... I would like to finish some work before doing it, so, IMO, I will release the 0.8 version with these updates and then, I will move everything to a new organization in order to follow your proposal!

Obviously any help is welcome /cc @sagikazarmark @jeromegamez :) Now, my first question is what would be the best name for this new organization?

@jeromegamez

This comment has been minimized.

Show comment
Hide comment
@jeromegamez

jeromegamez Apr 24, 2015

Contributor

I'd love to help 🙇 😄 .

What do you think about http-adapter, http-adapter-php or php-http-adapter, with repos/packages like http-adapter/core, http-adapter/curl-adapter, http-adapter/retry-subscriber and so on?

Contributor

jeromegamez commented Apr 24, 2015

I'd love to help 🙇 😄 .

What do you think about http-adapter, http-adapter-php or php-http-adapter, with repos/packages like http-adapter/core, http-adapter/curl-adapter, http-adapter/retry-subscriber and so on?

@egeloen

This comment has been minimized.

Show comment
Hide comment
@egeloen

egeloen Apr 24, 2015

Owner

Personally, I would vote for php-http-adapter

Owner

egeloen commented Apr 24, 2015

Personally, I would vote for php-http-adapter

@hannesvdvreken

This comment has been minimized.

Show comment
Hide comment
@hannesvdvreken

hannesvdvreken Apr 24, 2015

I don't know. Composer package name and github org can be different. What does ivory stand for? Sounds like a cool name for a collection of packages...

hannesvdvreken commented Apr 24, 2015

I don't know. Composer package name and github org can be different. What does ivory stand for? Sounds like a cool name for a collection of packages...

@egeloen

This comment has been minimized.

Show comment
Hide comment
@egeloen

egeloen Apr 24, 2015

Owner

The problem with Ivory is I use it for all packages I have developped... and futhermore it is already used by someone... https://github.com/Ivory

Owner

egeloen commented Apr 24, 2015

The problem with Ivory is I use it for all packages I have developped... and futhermore it is already used by someone... https://github.com/Ivory

@jeromegamez

This comment has been minimized.

Show comment
Hide comment
@jeromegamez

jeromegamez Apr 24, 2015

Contributor

They can be different, but they don't have to - if this GitHub organization would be to provide (for) a single framework (similar to symfony/*, phpunit/*, etc.), I would recommend naming it after the project, not after a (virtual) organization (or future company :D) - but I also don't care so much: the idea to bundle everything in one GitHub org is the main point, so I will not argue about names :)

Contributor

jeromegamez commented Apr 24, 2015

They can be different, but they don't have to - if this GitHub organization would be to provide (for) a single framework (similar to symfony/*, phpunit/*, etc.), I would recommend naming it after the project, not after a (virtual) organization (or future company :D) - but I also don't care so much: the idea to bundle everything in one GitHub org is the main point, so I will not argue about names :)

@jeromegamez

This comment has been minimized.

Show comment
Hide comment
@jeromegamez

jeromegamez Apr 24, 2015

Contributor

Oh wait, why not Ebony/*? It's already taken 😉

Contributor

jeromegamez commented Apr 24, 2015

Oh wait, why not Ebony/*? It's already taken 😉

@egeloen

This comment has been minimized.

Show comment
Hide comment
@egeloen

egeloen Apr 24, 2015

Owner

I just created the http-adapter-php organization in order to book it and not having suprise if someone creates it before me :)

If someone have a better naming I can still remove it :)

Owner

egeloen commented Apr 24, 2015

I just created the http-adapter-php organization in order to book it and not having suprise if someone creates it before me :)

If someone have a better naming I can still remove it :)

@sagikazarmark

This comment has been minimized.

Show comment
Hide comment
@sagikazarmark

sagikazarmark Apr 24, 2015

Contributor

I would be very happy to be part of this.

Actually, I am really bad at naming. It could either be something simple, but straightforward, like @jeromegamez's suggestions or something more like a fantasy name. I leave that to you. 😄

(My personal opinion is that php-http would be a good choice. This does not limit us to only work with http adapter related things, but anything that is related to php and http (even if the adapter would remain our main target). The adapter could be php-http/adapter, adapter packages could be php-http/guzzle-adapter.)

The separation work should not take too much time if it is well planned.

Some ideas that came into my mind:

  • We don't have to wait for 0.8 come out. The interfaces are pretty stable IMO. But even if the core package is not ready for separation, some more technical work can be done (after a proper name is picked): setting up organization, creating boilerplate package for adapters, setting up repositories, adding them to packagist, scrutinizer, etc. It can take a lot of time in case of many repositories. Actually, I like that type of work, so I am happy to help with that.
  • I am currently working on some projects related to http adapter: League event decorator, an authentication decorator (which I am happy to offer for the org). These could also be part of the organization and they are already separated packages.
Contributor

sagikazarmark commented Apr 24, 2015

I would be very happy to be part of this.

Actually, I am really bad at naming. It could either be something simple, but straightforward, like @jeromegamez's suggestions or something more like a fantasy name. I leave that to you. 😄

(My personal opinion is that php-http would be a good choice. This does not limit us to only work with http adapter related things, but anything that is related to php and http (even if the adapter would remain our main target). The adapter could be php-http/adapter, adapter packages could be php-http/guzzle-adapter.)

The separation work should not take too much time if it is well planned.

Some ideas that came into my mind:

  • We don't have to wait for 0.8 come out. The interfaces are pretty stable IMO. But even if the core package is not ready for separation, some more technical work can be done (after a proper name is picked): setting up organization, creating boilerplate package for adapters, setting up repositories, adding them to packagist, scrutinizer, etc. It can take a lot of time in case of many repositories. Actually, I like that type of work, so I am happy to help with that.
  • I am currently working on some projects related to http adapter: League event decorator, an authentication decorator (which I am happy to offer for the org). These could also be part of the organization and they are already separated packages.
@sagikazarmark

This comment has been minimized.

Show comment
Hide comment
@sagikazarmark

sagikazarmark Apr 24, 2015

Contributor

We need a website too....

Contributor

sagikazarmark commented Apr 24, 2015

We need a website too....

@sagikazarmark

This comment has been minimized.

Show comment
Hide comment
@sagikazarmark

sagikazarmark Apr 24, 2015

Contributor

Hey guys, don't we want to go on a more interactive communication channel? (IRC, gitter, ...)

Contributor

sagikazarmark commented Apr 24, 2015

Hey guys, don't we want to go on a more interactive communication channel? (IRC, gitter, ...)

@jeromegamez

This comment has been minimized.

Show comment
Hide comment
@jeromegamez

jeromegamez Apr 24, 2015

Contributor

Gitter 👍 - this would automatically provide us with repo based chats for the future, too!

Contributor

jeromegamez commented Apr 24, 2015

Gitter 👍 - this would automatically provide us with repo based chats for the future, too!

@sagikazarmark

This comment has been minimized.

Show comment
Hide comment
@sagikazarmark

sagikazarmark Apr 24, 2015

Contributor

Can also create a general chat room for the organization as well

Contributor

sagikazarmark commented Apr 24, 2015

Can also create a general chat room for the organization as well

@xabbuh

This comment has been minimized.

Show comment
Hide comment
@xabbuh

xabbuh Apr 24, 2015

When an adapter is extracted, the core package can suggest using one of the extracted adapter packages using the suggest field in composer.json

The cool thing is, Composer supports something like virtual packages. This means that the core package can depend on a non-existing package http-adapter/http-adapter-implementation which can then be provided by the concrete implementations.

xabbuh commented Apr 24, 2015

When an adapter is extracted, the core package can suggest using one of the extracted adapter packages using the suggest field in composer.json

The cool thing is, Composer supports something like virtual packages. This means that the core package can depend on a non-existing package http-adapter/http-adapter-implementation which can then be provided by the concrete implementations.

@sagikazarmark

This comment has been minimized.

Show comment
Hide comment
@sagikazarmark

sagikazarmark Apr 24, 2015

Contributor

@xabbuh just wanted to say that....

Contributor

sagikazarmark commented Apr 24, 2015

@xabbuh just wanted to say that....

@jeromegamez

This comment has been minimized.

Show comment
Hide comment
@jeromegamez

jeromegamez Apr 24, 2015

Contributor

Me too :D.

Contributor

jeromegamez commented Apr 24, 2015

Me too :D.

@jeromegamez

This comment has been minimized.

Show comment
Hide comment
@jeromegamez

jeromegamez Apr 24, 2015

Contributor

Eric seems to be busy - https://github.com/http-adapter-php is already gone again :)

Contributor

jeromegamez commented Apr 24, 2015

Eric seems to be busy - https://github.com/http-adapter-php is already gone again :)

@sagikazarmark

This comment has been minimized.

Show comment
Hide comment
@sagikazarmark

sagikazarmark Apr 24, 2015

Contributor

Yeah, it is php-http now

Contributor

sagikazarmark commented Apr 24, 2015

Yeah, it is php-http now

@egeloen

This comment has been minimized.

Show comment
Hide comment
@egeloen

egeloen Apr 24, 2015

Owner

You go too fast :)

@sagikazarmark You think your bad at naming but your proposal rocks 🤘 I just remove the php-http-adapter orga and create the php-http one.

I cant' work more tonight, I will move to a party :) I will come back here (probably tomorrow afternoom) and send you invitation to the orga.

Thanks for all your participation!

Owner

egeloen commented Apr 24, 2015

You go too fast :)

@sagikazarmark You think your bad at naming but your proposal rocks 🤘 I just remove the php-http-adapter orga and create the php-http one.

I cant' work more tonight, I will move to a party :) I will come back here (probably tomorrow afternoom) and send you invitation to the orga.

Thanks for all your participation!

@sagikazarmark

This comment has been minimized.

Show comment
Hide comment
@sagikazarmark

sagikazarmark Apr 24, 2015

Contributor

Will be here tomorrow then...

@egeloen enjoy the party

Contributor

sagikazarmark commented Apr 24, 2015

Will be here tomorrow then...

@egeloen enjoy the party

@hannesvdvreken

This comment has been minimized.

Show comment
Hide comment
@hannesvdvreken

hannesvdvreken Apr 24, 2015

Nice. This escalated quickly... Glad to see this taking off.

Woudn't matter to add other ivory-* packages as well, I just suggested that because it's a cool name, didn't check if it was available or not, because not at a computer now.

hannesvdvreken commented Apr 24, 2015

Nice. This escalated quickly... Glad to see this taking off.

Woudn't matter to add other ivory-* packages as well, I just suggested that because it's a cool name, didn't check if it was available or not, because not at a computer now.

@sagikazarmark

This comment has been minimized.

Show comment
Hide comment
@sagikazarmark

sagikazarmark Apr 25, 2015

Contributor

I created a boilerplate package for adapters:

https://github.com/sagikazarmark/boilerplate-adapter

Will transfer it to the organization.

Contributor

sagikazarmark commented Apr 25, 2015

I created a boilerplate package for adapters:

https://github.com/sagikazarmark/boilerplate-adapter

Will transfer it to the organization.

@egeloen

This comment has been minimized.

Show comment
Hide comment
@egeloen

egeloen Apr 25, 2015

Owner

Just send you invitation to the orga + I'm available on gitter :)

Owner

egeloen commented Apr 25, 2015

Just send you invitation to the orga + I'm available on gitter :)

@jeromegamez

This comment has been minimized.

Show comment
Hide comment
@jeromegamez

jeromegamez Apr 25, 2015

Contributor

Where on Gitter are you guys :)

Contributor

jeromegamez commented Apr 25, 2015

Where on Gitter are you guys :)

@sagikazarmark

This comment has been minimized.

Show comment
Hide comment
@sagikazarmark

sagikazarmark Apr 25, 2015

Contributor

In the organization room. https://gitter.im/php-http

Contributor

sagikazarmark commented Apr 25, 2015

In the organization room. https://gitter.im/php-http

@egeloen

This comment has been minimized.

Show comment
Hide comment
@egeloen

egeloen Apr 25, 2015

Owner

We are on gitter but we don't see you... Are you sure you are on the good thread?

Owner

egeloen commented Apr 25, 2015

We are on gitter but we don't see you... Are you sure you are on the good thread?

@jeromegamez

This comment has been minimized.

Show comment
Hide comment
@jeromegamez

jeromegamez Apr 25, 2015

Contributor

I tried that already, but Gitter tells me: "You've tried to access php-http's private organization room and you do not belong to this organization. Unfortunately this organization has no public rooms." :( But I am in the organization already…

Contributor

jeromegamez commented Apr 25, 2015

I tried that already, but Gitter tells me: "You've tried to access php-http's private organization room and you do not belong to this organization. Unfortunately this organization has no public rooms." :( But I am in the organization already…

@egeloen

This comment has been minimized.

Show comment
Hide comment
@egeloen

egeloen Apr 25, 2015

Owner

I have added you to the room manually, Not sure what's going on...

Owner

egeloen commented Apr 25, 2015

I have added you to the room manually, Not sure what's going on...

@sagikazarmark

This comment has been minimized.

Show comment
Hide comment
@sagikazarmark

sagikazarmark Apr 25, 2015

Contributor

Weird.... Don't you see the organization on the left side (on gitter)?

Contributor

sagikazarmark commented Apr 25, 2015

Weird.... Don't you see the organization on the left side (on gitter)?

@jeromegamez

This comment has been minimized.

Show comment
Hide comment
@jeromegamez

jeromegamez Apr 25, 2015

Contributor

I do, but even after logging out and in again, I still can't enter the organization room. Perhaps some caching issue at Gitter, I will try again now and then, it will work eventually :)

Contributor

jeromegamez commented Apr 25, 2015

I do, but even after logging out and in again, I still can't enter the organization room. Perhaps some caching issue at Gitter, I will try again now and then, it will work eventually :)

@hannesvdvreken

This comment has been minimized.

Show comment
Hide comment
@hannesvdvreken

hannesvdvreken Apr 25, 2015

I think you need to accept the org joining request. I haven't received one,
I'd like to join as well.
On 25 Apr 2015 5:17 pm, "Márk Sági-Kazár" notifications@github.com wrote:

Weird.... Don't you see the organization on the left side (on gitter)?


Reply to this email directly or view it on GitHub
#104 (comment)
.

hannesvdvreken commented Apr 25, 2015

I think you need to accept the org joining request. I haven't received one,
I'd like to join as well.
On 25 Apr 2015 5:17 pm, "Márk Sági-Kazár" notifications@github.com wrote:

Weird.... Don't you see the organization on the left side (on gitter)?


Reply to this email directly or view it on GitHub
#104 (comment)
.

@egeloen

This comment has been minimized.

Show comment
Hide comment
@egeloen

egeloen Dec 13, 2015

Owner

Closing as this is become a reality with https://github.com/php-http

Owner

egeloen commented Dec 13, 2015

Closing as this is become a reality with https://github.com/php-http

@egeloen egeloen closed this Dec 13, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment