Skip to content

Commit 0d7c913

Browse files
authored
Merge pull request #14 from patchlevel/upgrade-to-stable-version
upgrade to stable version
2 parents 85e60b2 + 1193ee8 commit 0d7c913

File tree

11 files changed

+746
-249
lines changed

11 files changed

+746
-249
lines changed

.github/workflows/coding-standard.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ name: "Check Coding Standard"
44

55
on:
66
pull_request:
7-
branches:
8-
- "master"
97
push:
108
branches:
11-
- "master"
9+
- "[0-9]+.[0-9]+.x"
1210

1311
jobs:
1412
static-analysis-coding-standard:

.github/workflows/phpstan.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
pull_request:
77
push:
88
branches:
9-
- "master"
9+
- "[0-9]+.[0-9]+.x"
1010

1111
jobs:
1212
static-analysis-phpstan:

.github/workflows/phpunit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
pull_request:
77
push:
88
branches:
9-
- "master"
9+
- "[0-9]+.[0-9]+.x"
1010

1111
jobs:
1212
phpunit:

.github/workflows/psalm.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ name: "Static Analysis by Psalm"
44

55
on:
66
pull_request:
7-
branches:
8-
- "master"
97
push:
108
branches:
11-
- "master"
9+
- "[0-9]+.[0-9]+.x"
1210

1311
jobs:
1412
static-analysis-psalm:

README.md

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,37 +14,19 @@ composer require patchlevel/event-sourcing-bundle
1414

1515
## configuration
1616

17-
### Add the event bus to the symfony messenger config:
18-
```
19-
framework:
20-
messenger:
21-
buses:
22-
event.bus:
23-
default_middleware: allow_no_handlers
24-
```
25-
26-
### Set the database connection
27-
```
28-
doctrine:
29-
dbal:
30-
connections:
31-
eventstore:
32-
url: '%env(EVENTSTORE_URL)%'
33-
```
34-
3517
### Define your aggregates with class namespace and the table name
3618

3719
Class `App\Domain\Profile\Profile` is from the [libraries example](https://github.com/patchlevel/event-sourcing#define-aggregates) and is using the table name `profile`
3820

3921
```
4022
patchlevel_event_sourcing:
23+
connection:
24+
url: '%env(EVENTSTORE_URL)%'
4125
store:
42-
dbal_connection: eventstore
43-
type: dbal_multi_table
26+
type: multi_table
4427
aggregates:
4528
profile:
4629
class: App\Domain\Profile\Profile
47-
message_bus: event.bus
4830
```
4931

5032
### Define which repository the aggregates is using
@@ -57,7 +39,7 @@ services:
5739
...
5840
App\Infrastructure\EventSourcing\Repository\ProfileRepository:
5941
arguments:
60-
$repository: '@event_sourcing.profile_repository'
42+
$repository: '@event_sourcing.repository.profile'
6143
```
6244

6345
### Enable migrations
@@ -92,8 +74,7 @@ and enter the id from the cache service.
9274
patchlevel_event_sourcing:
9375
snapshot_stores:
9476
default:
95-
type: psr6
96-
id: event_sourcing.cache
77+
service: event_sourcing.cache
9778
```
9879

9980
Finally you have to tell the aggregate that it should use this snapshot store.

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@
2121
"php": "^7.4|^8.0",
2222
"ext-json": "^7.4|^8.0",
2323
"doctrine/dbal": "^3.1.4",
24-
"patchlevel/event-sourcing": "1.0.0-rc1",
24+
"patchlevel/event-sourcing": "^1.0.0",
2525
"psr/simple-cache": "^1.0.1",
2626
"symfony/messenger": "^4.4.18|^5.1.10",
2727
"symfony/dependency-injection": "^4.4.18|^5.1.10",
2828
"symfony/http-kernel": "^4.4.18|^5.1.10",
29-
"symfony/config": "^4.4.18|^5.1.10"
29+
"symfony/config": "^4.4.18|^5.1.10",
30+
"symfony/console": "^4.4.18|^5.1.10"
3031
},
3132
"require-dev": {
3233
"ext-pdo_sqlite": "^7.4|^8.0",

0 commit comments

Comments
 (0)