Skip to content

Commit 2e21863

Browse files
authored
feat(symfony): use_symfony_listeners enable controllers (#1879)
documents api-platform/core#6102
1 parent 6935df3 commit 2e21863

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

core/controllers.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ controllers can be any valid [Symfony controller](https://symfony.com/doc/curren
88
Symfony controllers extending the [`Symfony\Bundle\FrameworkBundle\Controller\AbstractController`](http://api.symfony.com/4.1/Symfony/Bundle/FrameworkBundle/Controller/AbstractController.html)
99
helper class.
1010

11+
To enable this feature use `use_symfony_listeners: true` in your `api_platform` configuration file:
12+
13+
```yaml
14+
api_platform:
15+
title: 'My Dummy API'
16+
description: |
17+
This is a test API.
18+
Made with love
19+
use_symfony_listeners: true
20+
```
21+
1122
However, API Platform recommends to use **action classes** instead of typical Symfony controllers. Internally, API Platform
1223
implements the [Action-Domain-Responder](https://github.com/pmjones/adr) pattern (ADR), a web-specific refinement of
1324
[MVC](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller).

0 commit comments

Comments
 (0)