All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
PMG\Queue\Driver\PheanstalkDriver
no longer accepts arrays as its$options
argument, instead passPMG\Queue\Driver\Pheanstalk\ArrayOptions
.PMG\Queue\Driver\Pheanstalk\BuryFailureStrategy
no longer accepts an integer argument to its constructor, pass an options instance instead.PMG\Queue\Driver\Pheanstalk\PheanstalkOptions
now hasint|string|bool
return types for itsget{Global,Message}Option
methods.PMG\Queue\Driver\Pheanstalk\FailureStrategy
now hasvoid
return type on itsfail
method.
- Add support for PHP 8.X
- Dropped PHP 7.3 support
PMG\Queue\Driver\Pheanstalk\PheanstalkOptions
interface as added along with an implementation backed by an array (ArrayOptions
). This should allow end-users to change message options (things like priority, etc) based on incoming messages.
- Passing an array of options to
PheanstalkDriver
's constructor is deprecated, use aPheanstalkOptions
implementation instead (probablyArrayOptions
) - Passing null or an integer to
BuryFailureStrategy
is deprecated, pass aPheanstalkOptions
implementation instead.
Important Note: we're skipping v4.X because I'm tired of trying to figure
out which version of my own queue library goes with which driver. If it's a 5.X
version of any pmg/queue
library it will work with pmg/queue
5.X.
- PHP 7.3+ is now required.
pmg/queue
5.X is now required, and the drivers method signatures have changed to reflect theDriver
interface changes inpmg/queue
5.X- The
retry-delay
option was removed. Thepmg/queue
core now supports retry delays and the driver now uses that system.
n/a
n/a
- Pheanstalk 4.X is required to use the driver
- Dropped support for PHP 7.0 and 7.1
n/a
n/a
- Introduces a new
FailureStrategy
interface as a pluggable way to change how the driver deals with failed message. The default behavior is toBURY
them, though aDELETE
strategy is also supplied. Pass a (optiona)FailureStrategy
instance as the fourth argument ofPheanstalkDriver::__construct
.
- [BC BREAK] Migrated this driver from the main pmg/queue repository
- [BC BREAK] The order of arguments in
PheanstalkDriver
's constructor changed. You must pass aPMG\Queue\Serializer
instance as the second argument now.
use PMG\Queue\Driver\PheanstalkDriver;
use PMG\Queue\Serializer\NativeSerializer;
$conn = new \Pheanstalk\Pheanstalk();
// pmg/queue 2.X
$driver = new PheanstalkDriver($conn, [
// driver opts
]);
// pmg/queue 3.X
$serializer = new NativeSerializer('SuperSecretKey');
$driver = new PheanstalkDriver($conn, $serializer, [
// driver opts
]);
n/a
n/a