Streak is a PHP framework designed for building applications using the Event Sourcing pattern. It provides a robust foundation for creating event-sourced, domain-driven applications with a focus on flexibility and testability.
- Event Sourcing - Persistent event store with support for various storage backends
- Command Handling - Type-safe command processing with built-in validation
- Subscriptions - Reliable event delivery system with support for resuming, restarting, and pausing
- Projections - Tools for building read models optimized for querying
- Saga & Process Management - Support for long-running business processes across multiple aggregates
Install via Composer:
composer require streak/streak
For Symfony integration, install the Streak Bundle:
composer require streak/streak-bundle
Comprehensive documentation is available in the docs directory:
- PHP 8.0+
- Docker and Docker Compose
Clone the repository:
git clone https://github.com/streakphp/streak.git
cd streak
Start the development environment:
docker-compose up --detach --build
# Validate composer.json
docker compose run --rm --no-deps php composer validate --strict --no-interaction --ansi
# Install dependencies
docker compose run --rm --no-deps php composer install --no-scripts --no-interaction --ansi
# Run tests with coverage
docker compose run --rm --no-deps php xphp -dxdebug.mode=coverage bin/phpunit --color=always --configuration=phpunit.xml.dist
# Run tests without coverage
docker compose run --rm --no-deps php bin/phpunit
# Check code quality
docker compose run --rm --no-deps php bin/rector --dry-run --ansi
docker compose run --rm --no-deps php bin/deptrac --no-interaction --cache-file=./build/.deptrac/.deptrac.cache --ansi
docker compose run --rm --no-deps php bin/php-cs-fixer fix --diff --dry-run --ansi --config=.php-cs-fixer.dist.php
Streak is open-sourced software licensed under the MIT license.