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: docs/book/v6/tutorials/api-evolution.md
+6-49Lines changed: 6 additions & 49 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ API evolution: Updating an API while keeping it compatible for existing consumer
5
5
## How it works
6
6
7
7
In Dotkernel API we can mark an entire endpoint or a single method as deprecated using attributes on handlers.
8
-
We use response headers to inform the consumers about the future changes by using 2 new headers:
8
+
We use response headers to inform the consumers about the future changes by using two new headers:
9
9
10
10
-`Link` - it's a link to the official documentation pointing out the changes that will take place.
11
11
-`Sunset` - this header is a date, indicating when the deprecated resource will potentially become unresponsive.
@@ -17,7 +17,7 @@ We use response headers to inform the consumers about the future changes by usin
17
17
18
18
## Marking an entire endpoint as deprecated
19
19
20
-
When you want to mark an entire resource as deprecated you have to use the `ResourceDeprecation` attribute.
20
+
When you want to mark an entire resource as deprecated, you have to use the `ResourceDeprecation` attribute.
21
21
22
22
```php
23
23
...
@@ -56,60 +56,17 @@ Vary: Origin
56
56
57
57
## Marking a method as deprecated
58
58
59
-
Most of the time you want to deprecate only an endpoint, so you will need to use the `MethodDeprecation` attribute which has the same parameters, but it attaches to a handler method.
60
-
61
-
```php
62
-
...
63
-
class HomeHandler implements RequestHandlerInterface
0 commit comments