Wrong return types
mmenozzi opened this issue · 4 comments
mmenozzi commented
Hi,
I think that the send
callbacks of the following BeanstalkClient
methods have the wrong return type:
\Amp\Beanstalk\BeanstalkClient::delete
: return type hint isint
but it returnsbool
(anyway this doesn't raise an error)\Amp\Beanstalk\BeanstalkClient::bury
: return type hint isint
but it returnsbool
(anyway this doesn't raise an error)\Amp\Beanstalk\BeanstalkClient::touch
: return type hint isint
but it returnsbool
(anyway this doesn't raise an error)\Amp\Beanstalk\BeanstalkClient::release
: return type hint isint
but it returnsstring
(this raises a fatal error)
What do you think?
kelunik commented
release()
definitely needs to be fixed, the others are a slight (theoretical) BC break. I'd probably leave them as is until there's a new major version. Want to provide a PR?
kelunik commented
I already had the project open now, because I wanted to see if the IDE really doesn't catch those. Just fixed it and will release a new version in a few minutes.
kelunik commented
I have just released https://github.com/amphp/beanstalk/releases/tag/v0.2.1.
mmenozzi commented
Thank you!!