Skip to content

Commit 3a15fdf

Browse files
docs(fosuser-bundle): move from core to symfony and update (#2099)
1 parent 744130c commit 3a15fdf

File tree

3 files changed

+16
-11
lines changed

3 files changed

+16
-11
lines changed

core/jwt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ We're not done yet! Let's move on to configuring the Symfony SecurityBundle for
6565

6666
It is necessary to configure a user provider. You can either use the [Doctrine entity user provider](https://symfony.com/doc/current/security/user_provider.html#entity-user-provider)
6767
provided by Symfony (recommended), [create a custom user provider](https://symfony.com/doc/current/security/user_provider.html#creating-a-custom-user-provider)
68-
or use [API Platform's FOSUserBundle integration](fosuser-bundle.md) (not recommended).
68+
or use [API Platform's FOSUserBundle integration](../symfony/fosuser-bundle.md) (not recommended).
6969

7070
If you choose to use the Doctrine entity user provider, start by [creating your `User` class](https://symfony.com/doc/current/security.html#a-create-your-user-class).
7171

outline.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ chapters:
1010
- debugging
1111
- caddy
1212
- migrate-from-fosrestbundle
13+
- fosuser-bundle
1314
- title: "API Platform for Laravel"
1415
path: laravel
1516
items:
@@ -65,7 +66,6 @@ chapters:
6566
- user
6667
- form-data
6768
- angularjs-integration
68-
- fosuser-bundle
6969
- nelmio-api-doc
7070
- bootstrap
7171
- configuration

core/fosuser-bundle.md renamed to symfony/fosuser-bundle.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
1-
# FOSUserBundle Integration
1+
# FOSUserBundle Integration with Symfony
2+
3+
> [!WARNING]
4+
> The use of FOSUserBundle is no longer recommended for better flexibility and security. It is advised to switch to the
5+
> [Doctrine entity user provider](https://symfony.com/doc/current/security/user_provider.html#entity-user-provider) (recommended)
6+
> or consider [creating a custom user provider](https://symfony.com/doc/current/security/user_provider.html#creating-a-custom-user-provider).
27
38
## Installing the Bundle
49

5-
The installation procedure of the FOSUserBundle is described [in the main Symfony docs](https://symfony.com/doc/master/bundles/FOSUserBundle/index.html)
10+
The installation procedure of the FOSUserBundle is described [in the FOSUserBundle documentation](https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/docs/index.rst).
611

712
You can:
813

9-
- Skip [step 3 (Create your User class)](https://symfony.com/doc/master/bundles/FOSUserBundle/index.html#step-3-create-your-user-class)
14+
- Skip [step 3 (Create your User class)](https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/docs/index.rst#step-3-create-your-user-class)
1015
and use the class provided in the next paragraph to set up serialization groups the correct way
11-
- Skip [step 4 (Configure your application's security.yml)](https://symfony.com/doc/master/bundles/FOSUserBundle/index.html#step-4-configure-your-application-s-security-yml)
12-
if you are planning to [use a JWT-based authentication using `LexikJWTAuthenticationBundle`](jwt.md)
16+
- Skip [step 4 (Configure your application's security.yml)](https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/docs/index.rst#step-4-configure-your-applications-securityyml)
17+
if you are planning to [use a JWT-based authentication using `LexikJWTAuthenticationBundle`](../core/jwt.md)
1318

1419
If you are using the API Platform Standard Edition, you will need to enable the form services in the symfony framework
1520
configuration options:
@@ -22,11 +27,11 @@ framework:
2227
2328
## Creating a `User` Entity with Serialization Groups
2429

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).
26-
There's also an example for a [Doctrine MongoDB ODM](https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/index.rst#b-mongodb-user-class).
30+
Here's an example of declaration of a [Doctrine ORM User class](https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/docs/index.rst#a-doctrine-orm-user-class).
31+
There's also an example for a [Doctrine MongoDB ODM](https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/docs/index.rst#b-mongodb-user-class).
2732
You need to use serialization groups to hide some properties like `plainPassword` (only in read) and `password`. The properties
28-
shown are handled with [`normalizationContext`](serialization.md#normalization), while the properties
29-
you can modify are handled with [`denormalizationContext`](serialization.md#denormalization).
33+
shown are handled with [`normalizationContext`](../core/serialization.md#normalization), while the properties
34+
you can modify are handled with [`denormalizationContext`](../core/serialization.md#denormalization).
3035

3136
Create your User entity with serialization groups:
3237

0 commit comments

Comments
 (0)