teamsquad.io/php-event-bus

A basic PHP EventBus Library

v2.4.1 2024-08-02 11:55 UTC

README

TeamSquad PHP EventBus library package.

Source Code Download Package PHP Programming Language Build Status Codecov Code Coverage Psalm Type Coverage

This is the TeamSquad PHP EventBus Library. It's used to publish and listen to events.

Installation

composer require teamsquad/php-event-bus

Development

Initialization

composer install

Run composer scripts

composer test-all     # run test-quality & test-phpunit
composer test-quality # run csrun & psalm & phpstan
composer test-phpunit # run phpunit

composer csrun   # check code style
composer psalm   # run psalm coverage
composer phpstan # run phpstan coverage

Git hooks

Install the pre-commit hook running:

./tools/git-hooks/init.sh

Basic Dockerfile

If you don't have PHP in your local machine, you can use docker to build an image with PHP 8.0.

docker build -t php-event-bus .

Contributing

Feel free to open any PR with your ideas, suggestions or improvements.