Improve docs around worker#854
Conversation
DanielBadura
left a comment
There was a problem hiding this comment.
The other doc changes are also looking good from my side 👍
| !!! warning | ||
| From version 4.x onward, a MessageLoader will be required for the SubscriptionEngine | ||
| instead of a Store implementation. | ||
| Read more about it [here](./subscription.md#message-loader). In current versions, | ||
| you can still provide a Store, the SubscriptionEngine will wrap it internally. |
There was a problem hiding this comment.
I think you misunderstood. Let's just update the getting started to use the message loader instead of adding a warning here.
use Patchlevel\EventSourcing\Subscription\Engine\StoreMessageLoader;
$engine = new DefaultSubscriptionEngine(
new StoreMessageLoader($eventStore),
$subscriptionStore,
$subscriberRepository,
);There was a problem hiding this comment.
If you open the PR that maintainers can edit it, I can also do the adjustment :)
| !!! note | ||
|
|
||
| If you followed the confiration in the [Getting Started](./getting_started.md#configuration) section, | ||
| the Message Loader implementation replaces the $eventStore in the DefaultSubscriptionEngine. | ||
|
|
||
| ```php | ||
| $messageLoader = // whatever implementation you choose | ||
| $engine = new DefaultSubscriptionEngine( | ||
| - $eventStore, | ||
| + $messageLoader, | ||
| $subscriptionStore, | ||
| $subscriberRepository, | ||
| ); | ||
| ``` |
There was a problem hiding this comment.
then this is also not needed
|
@Brammm I created another PR which is adressing all points from here as we did launch a new docs website which led to some changes in the doc structure which i did not want you to resolve here. Also, i adjusted the getting started to use the message loader instead of adding some warnings in the docs. Thanks for the contribution! Ref: #858 |
While setting up patchlevel myself, I found the docs a little lacking around the Message Loader stuff and the process getting the worker set up. I think it can still be improved, it's mainly my own lack of knowledge about the subscription commands holding me back.