Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

Add getStream to interfaces. #16

Closed
Metalaka opened this issue Oct 22, 2015 · 4 comments
Closed

Add getStream to interfaces. #16

Metalaka opened this issue Oct 22, 2015 · 4 comments

Comments

@Metalaka
Copy link
Member

Since #15 Hoa\Stream::getStream is public.

But because interfaces is commonly used in type hinting, this method can't be used safely.
eg: class Foo extends Hoa\Stream\IStream\In { … which doesn't implement getStream.

IMO this method should be present in all Hoa\Stream\IStream interfaces.

Related to hoaproject/Console#51

@Hywan
Copy link
Member

Hywan commented Oct 26, 2015

Hello :-),

I agree… So far, we assume every object of kind Hoa\Stream\IStream\* is also of kind Hoa\Stream. Does it make sense?

But this is a weak assumption. We can introduce a Hoa\Stream\IStream\Stream interface, that will be implemented by Hoa\Stream and maybe Hoa\Stream\IStream\* interfaces.

This will introduce a BC break. We should do that in the same time we bump the PHP version.

Thoughts?

@Metalaka
Copy link
Member Author

Hoa\Stream\IStream\Stream must be implemented in Hoa\Stream\IStream\* to solve this issue.

Add an interface just for Hoa\Stream\Stream don't make sense.

Does it exist an issue for the next bump PHP version ?

@Hywan
Copy link
Member

Hywan commented Oct 26, 2015

Note: It's not a BC break because the library is still in beta. So it's fine.

Yup, you're right. That's what I was meaning.

@Hywan
Copy link
Member

Hywan commented Oct 26, 2015

So let's go :-).

And nop, no issue for the PHP5.4 drop.

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

No branches or pull requests

2 participants