invis1ble/messenger

Bus and Message Interfaces and Implementations.

v5.0.0 2024-06-12 21:37 UTC

README

CI Status Code Coverage Packagist MIT licensed

Bus and Message Interfaces and Implementations.

  • Command & Command Bus
  • Query & Query Bus
  • Event & Event Bus

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.0"
    }
}

After adding the above line, run the following command to install the package:

composer install

Development

Getting started

  1. If not already done, install Docker Compose (v2.10+)
  2. Run docker compose build --no-cache to build fresh images
  3. Run docker compose up -d --wait to start the Docker containers
  4. Run docker compose exec php composer install to install dependencies
  5. Run docker compose down --remove-orphans to stop the Docker containers.

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

License

The MIT License