All notable changes to AMQP Agent will be documented in this file.
- Initial release.
- Fix issue with Logger class:
- Fix additional line breaks when writing to log file.
- Add the possibility to open multiple connection by a worker.
- Update
AbstractWorker
class:- Add connections array and channels array.
- Add
setConnection()
,getNewConnection()
, andsetChannel()
methods. - Modify old methods to make use of the newly created methods internally.
- Add new tests to the newly created methods.
- Update methods signature on the corresponding interface (
AbstractWorkerInterface
) - Update DocBlocks of other classes to reference the newly created methods.
- Rebuild documentation.
- Update
composer.json
:- Bump minimum php-amqplib version.
- Downgrade minimum php version.
- Update dev requirements versions to match php version.
- Update branch-alias.
- Update scripts field.
- Add conflict field.
- Fix php < 7.4 type hinting incompatibility:
- Remove return type "self" from methods signature in all interfaces.
- Fix php-amqplib v2.12.0 deprecations:
- Fix references to deprecated properties in php-amqplib v2.12.0.
- Change
AbstractWorker
arguments method to a static method. - Refactor some internal functionalities in different classes.
- Update tests so that they run faster.
- Update Travis config.
- Rebuild documentation.
- Update
composer.json
:- Add a link for the documentation.
- Add some suggestions.
- Update
dev-autoload
namespace.
- Fix typos and update DocBlocks:
- Fix some typos in DocBlocks and other parts of the codebase.
- Add examples to major classes DocBlocks.
- Add
Utility
class to contain some miscellaneous reusable functions. - Refactor
Logger
class:- Internal changes to make use of the
Utility
class. - Better writing directory guessing when no path is specified.
- Internal changes to make use of the
- Update
AmqpAgentException
class:- Fix issue of wrong fully-qualified name when casting the class to a string.
- Change default message of
rethrowException
method to a more useful one. - Add a new parameter to change the wrapping thrown exception class.
- Rename the method
rethrowException()
torethrow()
and add the old name as an alias.
- Add
MagicMethodsExceptionsTrait
to unify error messages of calls to magic methods. - Add
AbstractParameters
class to simplify working with parameters:- Add
AmqpAgentParameters
as global class for all parameters. - Add worker specific parameters class (
AbstractWorkerParameters
,PublisherParameters
,ConsumerParameters
).
- Add
- Update configuration file (
maks-amqp-agent-config.php
) to make use of the newly createdAmqpAgentParameters
class. - Refactor workers classes (
AbstractWorker
,Publisher
,Consumer
):- Make use of the newly created
*Parameters
class. - Make use of the newly created
MagicMethodsExceptionsTrait
. - Remove
@codeCoverageIgnore
annotations from workers classes. - Remove constants from the corresponding
*Interface
as they are available now via*Parameters
. - Update the classes in different places to make use of the new additions.
- Make use of the newly created
- Update
WorkerCommandTrait
to make use of the newly createdAmqpAgentParameters
class. - Remove protected method
mutateClassConst()
fromWorkerMutationTrait
as it is not used anymore (usage replaced with*Parameters::patchWith()
). - Update old tests to cover the new changes.
- Update tests
- Add new tests for the newly created classes and functions.
- Update
phpunit.xml.dist
to run the new tests. - Update namespace across all test classes.
- Remove
*Mock
classes from*Test
classes and move them to their own namespace.
- Rebuild documentation.
- Update formatting of
CHANGELOG.md
.
- Update
composer.json
:- Update
branch-alias
version.
- Update
- Update
Utility
class:- Add
collapse()
method.
- Add
- Update
Client
class:- Add
gettable()
method. - Refactor
get()
method.
- Add
- Refactor
Logger
class:- Add
getFallbackFilename()
method. - Add
getFallbackDirectory()
method. - Add
getNormalizedPath()
method. - Refactor
log()
method to make use of the newly created methods.
- Add
- Update
MagicMethodsExceptionsTrait
:- Update exceptions messages to prevent notices when passing an array as an argument to magic methods.
- Fix coding style issues in different places.
- Rebuild documentation.
- Update
Config
class:- Remove deprecated method
get()
. - Remove
$configFlat
property and all of its references. - Update
$configPath
property to be a realpath. - Add
has()
method to quickly check if a config value exists. - Add
get()
method to quickly get a config value (new functionality, should be backwards compatible). - Add
set()
method to quickly set a config value.
- Remove deprecated method
- Update
Serializer
class:- Add serializations types as class constants.
- Add methods to assert for PHP und JSON (un)serializations errors.
- Refactor
serialize()
andunserialize()
methods to use assertions. - Refactor
setType()
method to check if the type is supported. - Add a new
$strict
property to determine serialization strictness and its correspondinggetStrict()
andsetStrict()
methods. - Add
$strict
parameter toserialize()
andunserialize()
methods. - Add
deserialize()
method as an alias forunserialize()
. - Refactor different methods to make use of available setters.
- Update DocBlocks und Exceptions Messages of different methods.
- Update
Utility
class:- Add
objectToArray()
method. - Add
arrayToObject()
method. - Add
getArrayValueByKey()
method. - Add
setArrayValueByKey()
method.
- Add
- Update
Logger
class:- Fix an issue with
log()
method when checking for file size.
- Fix an issue with
- Update tests
- Add new tests to the newly created methods.
- Update old tests to cover the new changes.
- Fix coding style issues in different places.
- Rebuild documentation.
- Update
composer.json
:- Update
branch-alias
version.
- Update
- Add RPC endpoints interfaces:
- Add
AbstractEndpointInterface
. - Add
ClientEndpointInterface
. - Add
ServerEndpointInterface
.
- Add
- Add RPC endpoints classes:
- Add
AbstractEndpoint
class. - Add
ClientEndpoint
class. - Add
ServerEndpoint
class. - Add
RPCEndpointParameters
class. - Add
RPCEndpointException
class.
- Add
- Add
IDGenerator
class for generating unique IDs and Tokens. - Add
EventTrait
and its correspondingEvent
class to expose a simplified API for handling events. - Add
ClassProxyTrait
and its correspondingClassProxy
class to expose a simplified API for manipulating objects. - Add
ArrayProxyTrait
and its correspondingArrayProxy
class to expose a simplified API for manipulating arrays. - Update
Utility
class:- Add
execute()
method. - Remove
collapse()
method (extracted toArrayProxy
). - Remove
objectToArray()
method (extracted toArrayProxy
). - Remove
arrayToObject()
method (extracted toArrayProxy
). - Remove
getArrayValueByKey()
method (extracted toArrayProxy
). - Remove
setArrayValueByKey()
method (extracted toArrayProxy
).
- Add
- Update
Client
class:- Add
$clientEndpoint
property. - Add
$serverEndpoint
property. - Add
getClientEndpoint()
method. - Add
getServerEndpoint()
method.
- Add
- Update
AmqpAgentParameters
class:- Add parameters for RPC endpoints.
- Update
Config
class:- Add references to RPC endpoints properties (
$rpcConnectionOptions
and$rpcQueueName
).
- Add references to RPC endpoints properties (
- Update configuration file (
maks-amqp-agent-config.php
):- Add references to RPC endpoints options.
- Update tests
- Add new tests to the newly created methods and classes.
- Add new mocks to help with classes testing.
- Add
bin/endpoint
executable to help with endpoints testing. - Update old tests to cover the new changes.
- Update
phpunit.xml.dist
to run the new tests.
- Rebuild documentation.
- Update
composer.json
:- Update
branch-alias
version. - Update
scripts
field.
- Update
- Update
AbstractWorker
class- Remove some useless code.
- Change exception type of
shutdown()
method toAmqpAgentException
. - Remove return value type hint
self
from methods signature due to unexpected behavior with different PHP versions.
- Update
Publisher
class- Remove some useless code.
- Change exception type of
publish()
andpublishBatch()
methods toAmqpAgentException
. - Remove return value type hint
self
from methods signature due to unexpected behavior with different PHP versions.
- Update
Consumer
class- Change
nack()
method wrong signature (remove default value from first parameter as it's useless). - Update method signature on the corresponding interface (
ConsumerInterface
). - Remove return value type hint
self
from methods signature due to unexpected behavior with different PHP versions.
- Change
- Update
WorkerCommandTrait
- Remove some useless code.
- Update
WorkerMutationTrait
- Change signature of
mutateClass()
method (remove default value from second parameter as it's useless). - Change visibility of
mutateClass()
from protected to private (this method should never be used directly).
- Change signature of
- Update
Config
class- Add additional check for return value of
realpath()
function in class constructor. - Remove return value type hint
self
from methods signature due to unexpected behavior with different PHP versions.
- Add additional check for return value of
- Update
Utility
class- Add additional check for script execution path in
execute()
method.
- Add additional check for script execution path in
- Update
Logger
class- Fix a wrong parameter type passed to third argument of
file_put_contents()
function.
- Fix a wrong parameter type passed to third argument of
- Update
Serializer
class- Remove return value type hint
self
from methods signature due to unexpected behavior with different PHP versions.
- Remove return value type hint
- Update
ClassProxyTrait
- Add additional check for
$fromObject
parameter of thecastObjectToClass()
method. - Add a third parameter to the call of
AmqpAgentException::rethrow()
method.
- Add additional check for
- Update
AmqpAgentException
- Change default value of
$wrap
parameter fromfalse
totrue
(this is the expected behavior according to parameter's description).
- Change default value of
- Update tests to cover the new minor changes.
- Add
declare(strict_types=1)
to all files of the package. - Update coding style to PSR12.
- Fix coding style issues in all files of the package.
- Fix DocBlocks in all files of the package.
- Fix typos in all files of the package.
- Update Continuous Integration config files.
- Update Development Dependencies config files.
- Rebuild documentation.
- Update
composer.json
:- Bump minimum php-amqplib version.
- Update php requirement.
- Update branch-alias.
- Update
WorkerFacilitationInterface
:- Change
work()
method return value type hint (frombool
tovoid
).
- Change
- Update
Publisher
class:- Update
publishBatch()
method, it takes now$parameters
(array) instead of$_exchange
(string) just like thepublish()
method. - Update
publishBatch()
method signature on the corresponding interface (PublisherInterface
). - Update
work()
method implementation to cover the new changes introduced to theWorkerFacilitationInterface
. - Update DocBlock on the corresponding
PublisherSingleton
class of the affected methods.
- Update
- Update
Consumer
class:- Update
work()
method implementation to cover the new changes introduced to theWorkerFacilitationInterface
. - Update
consume()
method to shut down all opened channels and connections. - Update DocBlock on the corresponding
ConsumerSingleton
class of the affected methods.
- Update
- Update
Utility
class:- Add
respond()
method.
- Add
- Update tests to cover the new changes.
- Fix some typos in DocBlocks and other parts of the codebase.
- Rebuild documentation.
- Update
Consumer
class:- Fix an issue with
waitForAll()
method when the first channel is closed. - Refactor
waitForAll()
method.
- Fix an issue with
- Rebuild documentation.