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/getting-started.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,9 +11,9 @@ You can choose your preferred stack between Symfony, Laravel, or bootstrapping t
11
11
12
12
If you are starting a new project, the easiest way to get API Platform up is to install [API Platform for Symfony](../symfony/index.md).
13
13
14
-
It comes with the API Platform core library integrated with [the Symfony framework](https://symfony.com), [the schema generator](../schema-generator/),
14
+
It comes with the API Platform core library integrated with [the Symfony framework](https://symfony.com), [the schema generator](../schema-generator/index.md),
15
15
[Doctrine ORM](https://www.doctrine-project.org),
16
-
[NelmioCorsBundle](https://github.com/nelmio/NelmioCorsBundle) and [test assertions dedicated to APIs](../symfony/testing-utilities.md).
16
+
[NelmioCorsBundle](https://github.com/nelmio/NelmioCorsBundle) and [test assertions dedicated to APIs](../symfony/testing.md).
17
17
18
18
[MongoDB](mongodb.md) and [Elasticsearch](elasticsearch.md) can also be easily enabled.
19
19
@@ -30,7 +30,8 @@ There are no mandatory configuration options although [many settings are availab
30
30
31
31
### Migrating from FOSRestBundle
32
32
33
-
If you plan to migrate from FOSRestBundle, you might want to read [this guide](migrate-from-fosrestbundle.md) to get started with API Platform.
33
+
If you plan to migrate from FOSRestBundle, you might want to read [this guide](../symfony/migrate-from-fosrestbundle.md)
Copy file name to clipboardExpand all lines: symfony/migrate-from-fosrestbundle.md
+15-13Lines changed: 15 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,11 @@
1
-
# Migrate From FOSRestBundle
1
+
# Migrate From FOSRestBundle with Symfony
2
2
3
3
[FOSRestBundle](https://github.com/FriendsOfSymfony/FOSRestBundle) is a popular bundle to rapidly develop RESTful APIs with Symfony.
4
4
This page provides a guide to help developers migrate from FOSRestBundle to API Platform.
5
5
6
-
[On 21 September 2021](https://x.com/lsmith/status/1440216817876627459), FOSRestBundle's creators recommended to use API Platform.
6
+
> [!IMPORTANT]
7
+
> Since [2021](https://x.com/lsmith/status/1440216817876627459), the creators of FOSRestBundle have recommended
8
+
> transitioning to **API Platform** as the preferred solution **for building modern APIs**.
7
9
8
10
## Features Comparison
9
11
@@ -21,7 +23,7 @@ See [The view layer](https://github.com/FriendsOfSymfony/FOSRestBundle/blob/3.x/
21
23
22
24
Add the `ApiResource` attribute to your entities, and enable the operations you desire inside. By default, every operation is activated.
23
25
24
-
See [Operations](operations.md).
26
+
See [Operations](../core/operations.md).
25
27
26
28
### Make custom controllers
27
29
@@ -31,11 +33,11 @@ Same as above.
31
33
32
34
**In API Platform**
33
35
34
-
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.
36
+
Even though this is not recommended, API Platform allows you to [create custom controllers](../core/controllers.md) and declare them in your entity's `ApiResource` attribute.
35
37
36
-
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.
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.
37
39
38
-
See [General Design Considerations](design.md).
40
+
See [General Design Considerations](../core/design.md).
39
41
40
42
### Routing system (with native documentation support)
41
43
@@ -49,7 +51,7 @@ See [Full default annotations](https://github.com/FriendsOfSymfony/FOSRestBundle
49
51
50
52
Use the `ApiResource` attribute to activate the HTTP methods you need for your entity. By default, all the methods are enabled.
51
53
52
-
See [Operations](operations.md).
54
+
See [Operations](../core/operations.md).
53
55
54
56
### Hook into the handling of the requests
55
57
@@ -63,7 +65,7 @@ See [Listener support](https://github.com/FriendsOfSymfony/FOSRestBundle/blob/3.
63
65
64
66
API Platform provides a lot of ways to customize the behavior of your API, depending on what you exactly want to do.
65
67
66
-
See [Extending API Platform](extending.md) for more details.
68
+
See [Extending API Platform](../core/extending.md) for more details.
67
69
68
70
### Customize the formats of the requests and the responses
69
71
@@ -81,7 +83,7 @@ Both the request and the response body's format can be customized.
81
83
82
84
You can configure the formats of the API either globally or in specific resources or operations. API Platform provides native support for multiple formats including JSON, XML, CSV, YAML, etc.
83
85
84
-
See [Content negotiation](content-negotiation.md).
86
+
See [Content negotiation](../core/content-negotiation.md).
85
87
86
88
### Name conversion
87
89
@@ -99,7 +101,7 @@ Both request and response bodies can be converted.
99
101
100
102
API Platform uses [name converters](https://symfony.com/doc/current/components/serializer.html#component-serializer-converting-property-names-when-serializing-and-deserializing) included in the Serializer component of Symfony. You can create your own by implementing the `NameConverterInterface` provided by Symfony.
101
103
102
-
See [_Name Conversion_ in The Serialization Process](serialization.md#name-conversion).
104
+
See [_Name Conversion_ in The Serialization Process](../core/serialization.md#name-conversion-for-symfony).
103
105
104
106
### Handle errors
105
107
@@ -113,7 +115,7 @@ See [ExceptionController support](https://github.com/FriendsOfSymfony/FOSRestBun
113
115
114
116
Map the exceptions to HTTP statuses in the `api_platform.exception_to_status` parameter.
115
117
116
-
See [Errors Handling](errors.md).
118
+
See [Errors Handling](../core/errors.md).
117
119
118
120
### Security
119
121
@@ -127,7 +129,7 @@ Use the `security` attribute in the `ApiResource` and `ApiProperty` attributes.
127
129
128
130
Note you can also use the `security.yml` file if you only need to limit access to specific roles.
129
131
130
-
See [Security](security.md).
132
+
See [Security](../core/security.md).
131
133
132
134
### API versioning
133
135
@@ -141,4 +143,4 @@ See [API versioning](https://github.com/FriendsOfSymfony/FOSRestBundle/blob/3.x/
141
143
142
144
API Platform has no native support for API versioning, but instead provides an approach consisting of deprecating resources when needed. It allows a smoother upgrade for clients, as they need to change their code only when it is necessary.
143
145
144
-
See [Deprecating Resources and Properties](deprecations.md).
146
+
See [Deprecating Resources and Properties](../core/deprecations.md).
0 commit comments