Skip to content

Commit

Permalink
Adding phpbench (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
floriankraemer authored Jul 20, 2024
1 parent 4d845d2 commit e119c11
Show file tree
Hide file tree
Showing 30 changed files with 793 additions and 44 deletions.
12 changes: 12 additions & 0 deletions .idea/eventsourcing.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/php.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ all:
@echo "Running CS-Fixer, CS-Checker, Static Analyser and Tests"
docker compose run php composer all

benchmark:
@echo "Running phpbench"
docker compose run php composer benchmark

shell:
@echo "Running shell"
docker compose run --service-ports --entrypoint /bin/bash php
12 changes: 2 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
# Phauthentic Event Sourcing Library

**⚠ Do not use it in production! This is still in development! ⚠**

A framework-agnostic event sourcing system.

Consider this library a framework to create your own flavor of event sourcing within your application. The library tries to provide different styles and flavors that you can freely combine to implement event sourcing in your application.

We consider the repository the main element in the system that connects the extraction of events from the actual aggregate the persistence of the aggregate taking snapshots and emitting events.

It features different ways of extracting information from your aggregates, pick your flavor:
The library tries to be as unopinionated as possible, it provides the basic building blocks to implement event sourcing in your application. The library will allow you to keep 3rd party dependencies to a minimum and will not force you to use a specific framework or library. Your aggregates can be free of third party dependencies if you want to go for that style.

* Via Attributes
* Via Interfaces
* Via Reflection
It features different ways of extracting information from your aggregates, pick your flavor: Via Attributes (recommended), Interfaces or Reflection. Using a reflection based extractor will allow you to keep your aggregates free of any dependency to this library.

## Installation

Expand Down
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"require-dev": {
"ext-pdo": "*",
"infection/infection": "^0.29.6",
"phpbench/phpbench": "^1.3",
"phpmd/phpmd": "^2.15",
"phpro/grumphp-shim": "^2.5",
"phpstan/phpstan": "^1.11",
Expand Down Expand Up @@ -79,6 +80,9 @@
"phpmd": [
"bin/phpmd ./src text cleancode,codesize,controversial,design"
],
"benchmark": [
"bin/phpbench run tests/Benchmark/ --report=aggregate"
],
"all": [
"@csfix",
"@cscheck",
Expand Down
Loading

0 comments on commit e119c11

Please sign in to comment.