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/fosuser-bundle.md
+1-22Lines changed: 1 addition & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,5 @@
1
1
# FOSUserBundle Integration
2
2
3
-
## ⚠️ Deprecated: this integration is deprecated and will be removed in API Platform 3
4
-
5
-
FOSUserBundle is not well suited for APIs. We strongly encourage you to use the [Doctrine user provider](https://symfony.com/doc/current/security/user_provider.html#entity-user-provider)
6
-
shipped with Symfony or to [create a custom user provider](https://symfony.com/doc/current/security/user_provider.html#creating-a-custom-user-provider)
7
-
instead of using this bundle.
8
-
9
-
API Platform is shipped with a bridge for [FOSUserBundle](https://github.com/FriendsOfSymfony/FOSUserBundle).
10
-
If the FOSUser bundle is enabled, this bridge will use its `UserManager` to create, update and delete user resources.
11
-
12
-
<palign="center"class="symfonycasts"><ahref="https://symfonycasts.com/screencast/api-platform/user-entity?cid=apip"><imgsrc="../distribution/images/symfonycasts-player.png"alt="User Entity screencast"><br>Watch the User Entity screencast</a></p>
13
-
14
3
## Installing the Bundle
15
4
16
5
The installation procedure of the FOSUserBundle is described [in the main Symfony docs](https://symfony.com/doc/master/bundles/FOSUserBundle/index.html)
@@ -31,16 +20,6 @@ framework:
31
20
form: { enabled: true }
32
21
```
33
22
34
-
## Enabling the Bridge
35
-
36
-
To enable the provided bridge with FOSUserBundle, you need to add the following configuration to API Platform:
37
-
38
-
```yaml
39
-
# api/config/packages/api_platform.yaml
40
-
api_platform:
41
-
enable_fos_user: true
42
-
```
43
-
44
23
## Creating a `User` Entity with Serialization Groups
45
24
46
25
Here's an example of declaration of a [Doctrine ORM User class](https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/index.rst#a-doctrine-orm-user-class).
@@ -65,7 +44,7 @@ use Symfony\Component\Serializer\Annotation\Groups;
0 commit comments