Description
Since i've upgraded my current project to php8.1 I always get the deprecation warning about passing null to the strlen() function.
Deprecated: strlen(): Passing null to parameter #1 ($string) of type string is deprecated
The call itself is not in this bundle, but rather in the underlying bunny-project
/vendor/bunny/bunny/src/Bunny/ClientMethods.php:1300)
$buffer->appendUint8(strlen($routingKey)); $buffer->append($routingKey);
but:
This bundle passes null down to bunny (because the used interop classes allow for that) where it gets put into an strlen() function which does not allow null to be passed.
https://github.com/php-enqueue/amqp-bunny/blob/master/AmqpContext.php#L221
https://github.com/php-enqueue/amqp-bunny/blob/master/AmqpContext.php#L230
https://github.com/php-enqueue/amqp-bunny/blob/master/AmqpContext.php#L239
So what's the better approach? Add a check in here or open an issue over at bunny to add stricter typechecks?