invis1ble / messenger
Bus and Message Interfaces and Implementations.
Requires
- php: >=8.2
- symfony/messenger: ^6.4 || ^7.0 || ^8.0
Requires (Dev)
- escapestudios/symfony2-coding-standard: ^3.18
- friendsofphp/php-cs-fixer: ^3.95
- phpunit/phpunit: ^11.5
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-29 00:31:19 UTC
README
Bus and Message Interfaces and Implementations.
- Command & Command Bus
- Query & Query Bus
- Event & Event Bus
Compatibility
| Symfony Messenger | PHP | CI coverage |
|---|---|---|
^6.4 |
8.2+ | PHP 8.2 / Messenger 6.4 |
^7.0 |
8.2+ | PHP 8.2 / Messenger 7.0 and 7.4 |
^8.0 |
8.4+ (8.4.1+ for Messenger 8.1) | PHP 8.4 / Messenger 8.0 and 8.1; PHP 8.5 / latest stable 8.x |
Symfony Messenger 8.1.7 is the latest stable version verified for this update. For new Symfony 8 applications, use PHP 8.5 and the maintained Symfony 8.1 series. The Composer constraints continue to allow Symfony 6.4 and 7.x on PHP 8.2+.
The public bus APIs are unchanged. Queries require exactly one synchronous handler
and return its result, including null or false. Handler failures are unwrapped
to the first original exception; middleware exceptions pass through unchanged.
Middleware can add stamps to the underlying Symfony envelope as before.
The library's message and handler interfaces are marker interfaces independent of
Symfony's removed MessageHandlerInterface. Register handlers using Symfony's
#[AsMessageHandler] attribute, explicit configuration, or a compatible integration
bundle. Implementing a marker interface alone does not register a handler.
Installation
To install this package, you can use Composer:
composer require invis1ble/messenger
or just add it as a dependency in your composer.json file:
{
"require": {
"invis1ble/messenger": "^5.1"
}
}
For a new project without composer.lock, install the dependencies:
composer install
For an existing project, use the composer require command above to update both
the manifest and its lock file.
To upgrade an existing installation for Symfony 8.1:
composer require 'invis1ble/messenger:^5.1' 'symfony/messenger:^8.1' --with-all-dependencies
Run Composer on PHP 8.4.1 or later for Symfony 8.1. No platform requirement bypass is needed. Any integration bundle must also declare compatible dependency ranges.
Development
Getting started
- If not already done, install Docker Compose (v2.10+)
- Run
docker compose build --no-cacheto build fresh images - Run
docker compose up -d --waitto start the Docker containers - Run
docker compose exec php composer installto install dependencies - Run
docker compose down --remove-orphansto stop the Docker containers.
The development image uses PHP 8.5. To check another supported PHP version, set
PHP_VERSION consistently when building and running Docker Compose, for example:
PHP_VERSION=8.4 docker compose build PHP_VERSION=8.4 docker compose run --rm -T php composer install PHP_VERSION=8.4 docker compose run --rm -T php composer check
For a clean dependency resolution, use a fresh checkout without vendor/ or
composer.lock. CI resolves stable dependencies separately for every combination
in the compatibility table and checks the actual PHP platform requirements.
Run all package checks:
docker compose exec php composer check
Check for Coding Standards violations
Run PHP_CodeSniffer checks:
docker compose exec -it php bin/php_codesniffer
Run PHP-CS-Fixer checks:
docker compose exec -it php bin/php-cs-fixer
Testing
To run Unit tests during development
docker compose exec php vendor/bin/phpunit
To run with coverage
XDEBUG_MODE=coverage docker compose up -d --wait
docker compose exec php vendor/bin/phpunit --coverage-clover var/log/coverage-clover.xml