You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/design.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ Again, it's up to the developers to use, or to not use these built-in state prov
40
40
they are dealing with.
41
41
API Platform makes it easy to create custom state providers and processors.
42
42
It also makes it easy to implement patterns such as [CQS](https://www.martinfowler.com/bliki/CommandQuerySeparation.html)
43
-
or [CQRS](https://martinfowler.com/bliki/CQRS.html) thanks to [the Messenger Component integration](messenger.md) and the [DTO support](dto.md).
43
+
or [CQRS](https://martinfowler.com/bliki/CQRS.html) thanks to [the Messenger Component integration](../symfony/messenger.md) and the [DTO support](dto.md).
44
44
45
45
Last but not least, to create [Event Sourcing](https://martinfowler.com/eaaDev/EventSourcing.html)-based systems, a convenient
Copy file name to clipboardExpand all lines: core/dto.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,7 @@ In some cases, using an input DTO is a way to avoid serialization groups.
74
74
75
75
## Use Symfony Messenger With an Input DTO
76
76
77
-
Let's use a message that will be processed by [Symfony Messenger](https://symfony.com/components/Messenger). API Platform has an [integration with messenger](./messenger.md), to use a DTO as input you need to specify the `input` attribute:
77
+
Let's use a message that will be processed by [Symfony Messenger](https://symfony.com/components/Messenger). API Platform has an [integration with messenger](../symfony/messenger.md), to use a DTO as input you need to specify the `input` attribute:
Copy file name to clipboardExpand all lines: core/extending.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ The following tables summarizes which extension point to use depending on what y
17
17
|[Normalizers](serialization.md#decorating-a-serializer-and-adding-extra-data)| customize the resource sent to the client (add fields in JSON documents, encode codes, dates...) |
18
18
|[Filters](filters.md)| create filters for collections and automatically document them (OpenAPI, GraphQL, Hydra) |
|[Messenger Handlers](messenger.md)| create 100% custom, RPC, async, service-oriented endpoints (should be used in place of custom controllers because the messenger integration is compatible with both REST and GraphQL, while custom controllers only work with REST) |
20
+
|[Messenger Handlers](../symfony/messenger.md)| create 100% custom, RPC, async, service-oriented endpoints (should be used in place of custom controllers because the messenger integration is compatible with both REST and GraphQL, while custom controllers only work with REST) |
21
21
|[DTOs](dto.md)| use a specific class to represent the input or output data structure related to an operation |
22
22
|[Kernel Events](events.md)| customize the HTTP request or response (REST only, other extension points must be preferred when possible) |
Copy file name to clipboardExpand all lines: symfony/messenger.md
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -69,9 +69,9 @@ Because the `messenger` attribute is `true`, when a `POST` is handled by API Pla
69
69
For this example, only the `POST` operation is enabled. We disabled the item operation using the `NotFoundAction`. A resource must have at least one item operation as it must be identified by an IRI, here the route `/people/1` exists, eventhough it returns a 404 status code.
70
70
We use the `status` attribute to configure API Platform to return a [202 Accepted HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/202).
71
71
It indicates that the request has been received and will be treated later, without giving an immediate return to the client.
72
-
Finally, the `output` attribute is set to `false`, so the HTTP response that will be generated by API Platform will be empty, and the [serialization process](serialization.md) will be skipped.
72
+
Finally, the `output` attribute is set to `false`, so the HTTP response that will be generated by API Platform will be empty, and the [serialization process](../core/serialization.md) will be skipped.
73
73
74
-
**Note:** when using `messenger=true` ApiResource attribute in a Doctrine entity, the Doctrine Processor is not called. If you want the Doctrine Processor to be called, you should [decorate a built-in state processor](state-processors.md#decorating-the-built-in-state-processors) and implement your own logic.
74
+
**Note:** when using `messenger=true` ApiResource attribute in a Doctrine entity, the Doctrine Processor is not called. If you want the Doctrine Processor to be called, you should [decorate a built-in state processor](../core/state-processors.md#creating-a-custom-state-processor) and implement your own logic.
75
75
76
76
## Registering a Message Handler
77
77
@@ -116,7 +116,7 @@ To differentiate typical persists calls (create and update) and removal calls, c
116
116
117
117
## Using Messenger with an Input Object
118
118
119
-
Set the `messenger` attribute to `input`, and API Platform will automatically dispatch the given Input as a message instead of the Resource. Indeed, it'll add a default `DataTransformer` ([see input/output documentation](./dto.md)) that handles the given `input`. In this example, we'll handle a `ResetPasswordRequest` on a custom operation on our `User` resource:
119
+
Set the `messenger` attribute to `input`, and API Platform will automatically dispatch the given Input as a message instead of the Resource. Indeed, it'll add a default `DataTransformer` ([see input/output documentation](../core/dto.md)) that handles the given `input`. In this example, we'll handle a `ResetPasswordRequest` on a custom operation on our `User` resource:
120
120
121
121
```php
122
122
<?php
@@ -163,7 +163,7 @@ final class ResetPasswordRequest
163
163
164
164
As above, we use the `status` attribute to configure API Platform to return a [202 Accepted HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/202).
165
165
It indicates that the request has been received and will be treated later, without giving an immediate return to the client.
166
-
Finally, the `output` attribute is set to `false`, so the HTTP response that will be generated by API Platform will be empty, and the [serialization process](serialization.md) will be skipped.
166
+
Finally, the `output` attribute is set to `false`, so the HTTP response that will be generated by API Platform will be empty, and the [serialization process](../core/serialization.md) will be skipped.
167
167
168
168
In this case, when a `POST` request is issued on `/users/reset_password` the message handler will receive an `App\Dto\ResetPasswordRequest` object instead of a `User` because we specified it as `input` and set `messenger=input`:
Copy file name to clipboardExpand all lines: symfony/migrate-from-fosrestbundle.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ Same as above.
35
35
36
36
Even though this is not recommended, API Platform allows you to [create custom controllers](controllers.md) and declare them in your entity's `ApiResource` attribute.
37
37
38
-
You can use them as you migrate from FOSRestBundle, but you should consider [switching to Symfony Messenger](../core/messenger.md) as it will give you more benefits, such as compatibility with both REST and GraphQL and better performances of your API on big tasks.
38
+
You can use them as you migrate from FOSRestBundle, but you should consider [switching to Symfony Messenger](messenger.md) as it will give you more benefits, such as compatibility with both REST and GraphQL and better performances of your API on big tasks.
39
39
40
40
See [General Design Considerations](../core/design.md).
0 commit comments