All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Major versions may make incompatible API changes or remove features. The backward compatibility promise has the following exceptions:
- Any classes not in the package's root namespace (i.e. files directly in the
src
directory); - Units of code that are annotated with
@internal
.
- Add new
BuriedException
thrown byput()
andrelease()
when the server returns this error. This is a minor BC break because these commands previously returned a positive response for this error. - Add new
DrainingException
thrown byput()
when the server is in draining mode and cannot accept new jobs. Previously this threwCommandException
which the new exception extends. - Add draining status to the
server:stats
CLI command. - Add constants with standardised codes and messages for
NotFoundException
. - Add support for a Logger to capture connection failures.
- Update commands to better reflect the protocol:
watch()
returns integer of number of watched tubes.ignore()
throwsCommandException
if trying to ignore the final tube.useTube()
,touch()
,release()
,bury()
,delete()
have void return type.
- Status is a required argument for the
tube:peek
CLI command. - BC break:
Pool
is constructed directly with an array ofConnection
; does not useCollection
. See updated examples. - BC break:
reserve()
throwsNotFoundException
if no jobs available, rather than return null. - BC break:
peekBuried()
,peekDelayed()
&peekReady()
throwNotFoundException
if there are no matching jobs, rather than return null. - BC break: Change
Collection::getConnection()
to throwInvalidArgumentException
instead ofNotFoundException
if the given connection key does not exist in the pool. - BC break: Constructor for
Connection
no longer needs aSocket
. Pass the same parameters directly toConnection
. - BC break: Move core
ConnectionInterface
up to package root namespace. - BC break: Deprecated static Factory methods are now instance-based.
- BC break: Move
ValidateTrait
andStatsService
out of root namespace. No impact to standard use of this package.
- BC break: Strategy options are removed. Server choice is random when picking one.
- BC break: Config format no longer supports nesting under
servers
key. - BC break: Remove
Socket::getUniqueIdentifier()
andSocket::connect()
only needed internally. No impact to standard use of this package. - BC break: Remove
SocketInterface
. The details of a connection's socket are only for internal implementation. No impact to standard use of this package.
- Add
--watch
option tobeanstalk tube:stats
CLI command. - Add value to
--watch
CLI options, to specify the refresh interval. Add info line to show the interval and current datetime. - Add new Server Distribution CLI command, to show the balance of workers and jobs across a Pool.
- Add options to the CLI command to specify a host and port. Useful for testing without the need to create a config file.
- Factory methods will become instance-based with the same name, in the next major version.
- Kick command type error
- Add specific support for PHP v8
- Type declarations have been added to all method parameters and return types where possible. Some methods return mixed type so docblocks are still used.
- Add type definitions docblocks for
Collection::sendToAll()
callbacks. There is no change to functionality, but this better explains how these work. put()
andrelease()
validate the delay and TTR parameters for integers in a valid range.
Pool::ignore()
incorrectly updated its own cache of watched tubes, meaning multiple calls may have had unexpected results.
- BC break: Split
Command\Peek(<string>)
toCommand\PeekStatus
.Command\Peek
now only accepts a Job ID integer. Will not impact standard implementations which directly use theConnection::peek*
methods.Command\Peek
status constants are now onCommand\PeekStatus
. - BC break: Restrict
Collection::send*
methods to only accept commands defined inConnectionInterface
, rather than allowing any method to be called on the connection. - BC break: Replace union false return types with nullable types. For
example, a method that previously hinted
array|false
is now typed?array
, and will returnnull
for the same state it previously returnedfalse
. - BC break:
ValidateTrait::validatePriority()
no longer returns a value. - Order of stats in
server:stats
CLI command to match order from Beanstalkd. - BC break: Reduce visibility of internal methods and properties. These members are not part of the public API. No impact to standard use of this package. If an implementation has a use case which needs to override these members, please submit a pull request explaining the change.
- BC break: Removed support for PHP versions <= v7.3 as they are no longer actively supported by the PHP project.
- BC break: Removed cast Command classes as string to reveal raw command.
Release deleted to allow for further changes requiring BC breaks.
- Add support for Symfony/Console v5
- Add a Change Log. Previous releases are shown as date only. See descriptions on project releases page.