Skip to content

[5.0.0] 2023-01-13

Latest
Compare
Choose a tag to compare
@thomasvargiu thomasvargiu released this 13 Jan 10:36
ef4909b

Changes

  • feat: add PHP 8 support (thanks to @darckking)
  • feat: drop support for PHP < 7.4
  • feat: add properties types
  • feat: flag internal methods with @internal
  • fix: fix types with Psalm
  • feat: add support for configuration static analysis
  • feat: remove unused dependencies
  • feat: support for Serializer service
  • chore: use GH actions for build

Braking changes

  • There are some breaking changes after adding types to class properties
  • no_wait configuration no longer exists for queues and exchanges
  • The serializer configuration for RPC client and server now doesn't support a Laminas\Serializer factory string. You need to change it to and array: 'serializer' => ['name' => 'PhpSerializer']. Now the serializer setting set as string will try to retrieve a Serializer from the service container.

Static Analysis

All configuration options have a fromArray static method to create serializable configuration with support to static analysis and IDE autocomplete (if phpstan or psalm is supported).

$config = [
    'rabbitmq' => [
        'consumer' => [
            'consumer1' => Options\Consumer::fromArray([
                'callback' => 'callback-service',
                'queue' => [
                    'name' => 'consumer-queue',
                ],
            ])
        ],
    ],
];