Make SubscribingHandlerInterface::getSubscribingMethods() return iterable
I'm using generators inside of this method so this would allow them to be used officially
| Q | A |
|---|---|
| Bug fix? | no |
| New feature? | no |
| Doc updated | no |
| BC breaks? | yes |
| Deprecations? | no |
| Tests pass? | yes |
| License | MIT |
is adding this method signature a BC break? how would it behave if someone tries to override it ?
You're right, it was array before so it's BC
If this is a BC break I would suggest to make this function no longer static. It is not used that way.
Not sure if it's BC break. array is covariant to iterable.
The BC break is that implementations of the interface without the return type won't work anymore due to signature incompatibility.
@Tobion afaik implementations of the interface without the return type are compatible
interface Foo
{
public function fcn() : iterable;
}
class Bar implements Foo
{
public function fcn()
{
}
}
No it's not: https://3v4l.org/c8lWB