DOC add a callout to the deprecation notice

This seems more inline with other docs pages I have seen.
This commit is contained in:
Ed Wilde 2021-02-11 11:33:01 +13:00 committed by GitHub
parent eaadd40c3b
commit c3499d20e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,8 +6,11 @@ summary: Create objects for modifying request and response objects across contro
# HTTP Middlewares # HTTP Middlewares
HTTP Middlewares allow you to put code that will run before or after. These might be used for HTTP Middlewares allow you to put code that will run before or after. These might be used for
authentication, logging, caching, request processing, and many other purposes. Note this interface authentication, logging, caching, request processing, and many other purposes.
replaces the SilverStripe 3 interface [RequestFilter](api:SilverStripe\Control\RequestFilter), which still works but is deprecated.
[notice]
Note this interface replaces the SilverStripe 3 interface [RequestFilter](api:SilverStripe\Control\RequestFilter), which still works but is deprecated.
[/notice]
To create a middleware class, implement `SilverStripe\Control\Middleware\HTTPMiddleware` and define the To create a middleware class, implement `SilverStripe\Control\Middleware\HTTPMiddleware` and define the
`process(HTTPRequest $request, callable $delegate)` method. You can do anything you like in this `process(HTTPRequest $request, callable $delegate)` method. You can do anything you like in this