Skip to content

Commit 100462b

Browse files
committed
Prepare docs
1 parent 8021082 commit 100462b

13 files changed

Lines changed: 280 additions & 409 deletions

File tree

Lines changed: 174 additions & 148 deletions
Large diffs are not rendered by default.
Lines changed: 39 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ We keep the example small, so we can only create hotels and let guests check in
55

66
For this example we use [symfony/mailer](https://symfony.com/doc/current/mailer.html).
77

8-
!!! info
8+
:::note
9+
First of all, the bundle has to be installed and configured.
10+
If you haven't already done so, see the [installation introduction](installation.md).
11+
:::
912

10-
First of all, the bundle has to be installed and configured.
11-
If you haven't already done so, see the [installation introduction](installation.md).
12-
1313
## Define some events
1414

1515
First we define the events that happen in our system.
@@ -68,10 +68,11 @@ final class GuestIsCheckedOut
6868
}
6969
}
7070
```
71-
!!! note
7271

73-
You can find out more about events in the [library](https://event-sourcing.patchlevel.io/latest/events/).
74-
72+
:::note
73+
You can find out more about events in the [library](https://event-sourcing.patchlevel.io/latest/events/).
74+
:::
75+
7576
## Define aggregates
7677

7778
Next we need to define the hotel aggregate.
@@ -168,10 +169,11 @@ final class Hotel extends BasicAggregateRoot
168169
}
169170
}
170171
```
171-
!!! note
172172

173-
You can find out more about aggregates in the [library](https://event-sourcing.patchlevel.io/latest/aggregate/).
174-
173+
:::note
174+
You can find out more about aggregates in the [library](https://event-sourcing.patchlevel.io/latest/aggregate/).
175+
:::
176+
175177
## Define projections
176178

177179
Now we want to see which guests are currently checked in at a hotel or when a guest checked in and out.
@@ -276,14 +278,15 @@ final class GuestProjection
276278
}
277279
}
278280
```
279-
!!! warning
280281

281-
autoconfigure need to be enabled, otherwise you need add the `event_sourcing.subscriber` tag.
282-
283-
!!! note
282+
:::warning
283+
autoconfigure need to be enabled, otherwise you need add the `event_sourcing.subscriber` tag.
284+
:::
285+
286+
:::note
287+
You can find out more about projections in the [library](https://event-sourcing.patchlevel.io/latest/subscription/).
288+
:::
284289

285-
You can find out more about projections in the [library](https://event-sourcing.patchlevel.io/latest/subscription/).
286-
287290
## Processor
288291

289292
In our example we also want to send an email to the head office as soon as a guest is checked in.
@@ -320,14 +323,15 @@ final class SendCheckInEmailProcessor
320323
}
321324
}
322325
```
323-
!!! warning
324326

325-
autoconfigure need to be enabled, otherwise you need add the `event_sourcing.subscriber` tag.
326-
327-
!!! note
327+
:::warning
328+
autoconfigure need to be enabled, otherwise you need add the `event_sourcing.subscriber` tag.
329+
:::
330+
331+
:::note
332+
You can find out more about processor in the [library](https://event-sourcing.patchlevel.io/latest/subscription/)
333+
:::
328334

329-
You can find out more about processor in the [library](https://event-sourcing.patchlevel.io/latest/subscription/)
330-
331335
## Database setup
332336

333337
So that we can actually write the data to a database, we need the associated schema and databases.
@@ -342,10 +346,11 @@ or you can use doctrine migrations:
342346
bin/console event-sourcing:migrations:diff
343347
bin/console event-sourcing:migrations:migrate
344348
```
345-
!!! note
346349

347-
You can find out more about the cli in the [library](https://event-sourcing.patchlevel.io/latest/cli/).
348-
350+
:::note
351+
You can find out more about the cli in the [library](https://event-sourcing.patchlevel.io/latest/cli/).
352+
:::
353+
349354
## Usage
350355

351356
We are now ready to use the Event Sourcing System. We can load, change and save aggregates.
@@ -419,15 +424,14 @@ final class HotelController
419424
```
420425
## Result
421426

422-
!!! success
427+
:::success
428+
We have successfully implemented and used event sourcing.
423429

424-
We have successfully implemented and used event sourcing.
425-
426-
Feel free to browse further in the documentation for more detailed information.
427-
If there are still open questions, create a ticket on Github and we will try to help you.
428-
429-
!!! note
430+
Feel free to browse further in the documentation for more detailed information.
431+
If there are still open questions, create a ticket on Github and we will try to help you.
432+
:::
430433

431-
This documentation is limited to the bundle integration.
432-
You should also read the [library documentation](https://event-sourcing.patchlevel.io/latest/).
433-
434+
:::note
435+
This documentation is limited to the bundle integration.
436+
You should also read the [library documentation](https://event-sourcing.patchlevel.io/latest/).
437+
:::
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ for [event-sourcing](https://github.com/patchlevel/event-sourcing) library.
2424
```bash
2525
composer require patchlevel/event-sourcing-bundle
2626
```
27-
!!! info
27+
:::note
28+
If you don't use the symfony flex recipe for this bundle, you need to follow
29+
this [installation documentation](installation.md).
30+
:::
2831

29-
If you don't use the symfony flex recipe for this bundle, you need to follow
30-
this [installation documentation](installation.md).
31-
32-
!!! tip
32+
:::tip
33+
Start with the [quickstart](./getting-started.md) to get a feeling for the bundle.
34+
:::
3335

34-
Start with the [quickstart](./getting_started.md) to get a feeling for the bundle.
35-
3636
## Integration
3737

3838
* [Psalm](https://github.com/patchlevel/event-sourcing-psalm-plugin)
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ The first thing to do is to install packet if it has not already been done.
1111
```bash
1212
composer require patchlevel/event-sourcing-bundle
1313
```
14-
!!! note
1514

16-
how to install [composer](https://getcomposer.org/doc/00-intro.md)
17-
15+
:::note
16+
how to install [composer](https://getcomposer.org/doc/00-intro.md)
17+
:::
18+
1819
## Enable bundle
1920

2021
Then we have to activate the bundle in the `config/bundles.php`:
@@ -77,10 +78,11 @@ Finally, we have to fill the ENV variable with a connection url.
7778
```dotenv
7879
EVENTSTORE_URL="pdo-pgsql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8"
7980
```
80-
!!! note
8181

82-
You can find out more about what a connection url looks like [here](https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url).
83-
82+
:::note
83+
You can find out more about what a connection url looks like [here](https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url).
84+
:::
85+
8486
## Database with Docker
8587

8688
If you are using docker, you can use the following `compose.yaml` file to start a postgres database.
@@ -120,7 +122,7 @@ For this you have to add the following configuration to the `.symfony.local.yaml
120122
workers:
121123
docker_compose: ~
122124
```
123-
!!! success
124125

125-
You have successfully installed the bundle. Now you can start with the [quickstart](./getting_started.md) to get a feeling for the bundle.
126-
126+
:::success
127+
You have successfully installed the bundle. Now you can start with the [quickstart](./getting-started.md) to get a feeling for the bundle.
128+
:::

docs/mkdocs.yml

Lines changed: 0 additions & 102 deletions
This file was deleted.

docs/overrides/assets/favicon.png

-506 KB
Binary file not shown.

docs/overrides/assets/logo.png

-189 KB
Binary file not shown.

docs/overrides/main.html

Lines changed: 0 additions & 18 deletions
This file was deleted.

docs/overrides/partials/integrations/analytics/custom.html

Lines changed: 0 additions & 13 deletions
This file was deleted.

docs/pages/stylesheets/extra.css

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)