Skip to content

Add StreamFactoryDiscovery #18

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 3 commits into from
Nov 11, 2015
Merged

Add StreamFactoryDiscovery #18

merged 3 commits into from
Nov 11, 2015

Conversation

mekras
Copy link
Contributor

@mekras mekras commented Nov 10, 2015

Supports Guzzle and Zend Diactoros.

Supports Guzzle and Zend Diactoros.
/**
* Zend Diactoros StreamFactory
*
* @author GeLo <[email protected]>
Copy link
Member

Choose a reason for hiding this comment

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

Remove Eric please.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But it's code written by him. I just copied it from MessageFactory.

Copy link
Member

Choose a reason for hiding this comment

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

Actually, it is written by me. Back then I added Eric to each files he had any connection with, but that class is 90% rewritten by me. Even if it is copied partly, please add only yourself.

You might also add a comment that the code is copied from message factory. Actually, the ultimate solution would be somehow share the code between the two classes. But let's think about it later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK

@sagikazarmark
Copy link
Member

Nice job @mekras

@joelwurtz
Copy link
Member

I think message factory should have an injected stream factory to create stream (actually it create stream from a protected method)

@sagikazarmark
Copy link
Member

I also thought about that. But it would complicate using the MessageFactory.

Actually, we could even instantiate the stream factory or use the StreamDiscovery in MessageFactory.

Since the MessageFactory uses the exact same code, hard coupling is probably not a problem here.

sagikazarmark added a commit that referenced this pull request Nov 11, 2015
Add StreamFactory and Discovery
@sagikazarmark sagikazarmark merged commit ffd9756 into php-http:master Nov 11, 2015
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