Skip to content
Merged

Add v5 #3396

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 16 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `RoutingMiddleware` handles the routing process.
- `EndpointMiddleware` processes the routing results and invokes the controller/action handler.
- Simplified Error handling concept. Relates to #3287.
- Separation of Exceptions handling, PHP Error handling and Exception logging into different middleware.
- Separation of Exceptions handling, PHP Error handling and Exception logging into different middleware classes.
- `ExceptionLoggingMiddleware` for custom error logging.
- `ExceptionHandlingMiddleware` delegates exceptions to a custom error handler.
- `ErrorHandlingMiddleware` converts errors into `ErrorException` instances that can then be handled by the `ExceptionHandlingMiddleware` and `ExceptionLoggingMiddleware`.
- New custom error handlers using the new `ExceptionLoggingMiddleware` middleware.
- New `JsonExceptionRenderer` generates JSON error response.
- New `XmlExceptionRenderer` generates XML error response.
- New `BasePathMiddleware` for dealing with Apache subdirectories.
- New `HeadMethodMiddleware` ensures that the response body is empty for HEAD requests.
- New `JsonRenderer` utility class for rendering JSON responses.
- New `RequestResponseTypedArgs` invocation strategy for route parameters with type declarations.
- New `UrlGeneratorMiddleware` injects the `UrlGenerator` into the request attributes.
- New `CorsMiddleware` for handling CORS requests.
- `JsonExceptionMiddleware` generates JSON error response.
- `HtmlExceptionMiddleware` generates HTML error response.
- `XmlExceptionMiddleware` generates XML error response.
- `PlainTextExceptionMiddleware` handles and formats exceptions into plain text responses.
- `ErrorExceptionMiddleware` converts PHP errors into `ErrorException` instances that can then be handled by the `ExceptionHandlingMiddleware` and `ExceptionLoggingMiddleware`.
- `BasePathMiddleware` for dealing with Apache subdirectories.
- `JsonBodyParserMiddleware` for parsing JSON requests.
- `XmlBodyParserMiddleware` for parsing XML requests.
- `FormUrlEncodedBodyParserMiddleware` for parsing form requests.
- `CorsMiddleware` for handling CORS requests.
- `UrlGeneratorMiddleware` injects the `UrlGenerator` into the request attributes.
- `HeadMethodMiddleware` ensures that the response body is empty for HEAD requests.
- `RequestResponseTypedArgs` invocation strategy for route parameters with type declarations.
- Support to build a custom middleware pipeline without the Slim App class. See new `ResponseFactoryMiddleware`
- New media type detector
- New ContainerFactoryInterface and PhpDiContainerFactory class
Expand All @@ -50,8 +52,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Removed

* Remove LIFO middleware order support. Use FIFO instead.
* LIFO middleware order support. Use FIFO instead.
* Router cache file support (File IO was never sufficient. PHP OpCache is much faster)
* Removed `BodyParsingMiddlewareTest` in favor of `JsonBodyParserMiddleware`, `XmlBodyParserMiddleware` and `FormUrlEncodedBodyParserMiddleware`.
* The `$app->redirect()` method because it was not aware of the basePath. Use the `UrlGenerator` instead.
* The route `setArguments` and `setArgument` methods. Use a middleware for custom route arguments now.
* The `RouteContext::ROUTE` const. Use `$route = $request->getAttribute(RouteContext::ROUTING_RESULTS)->getRoute();` instead.
Expand Down
2 changes: 1 addition & 1 deletion Slim/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
*
* @api
*/
class App implements RouteCollectionInterface
class App implements RequestHandlerInterface, RouteCollectionInterface
{
use RouteCollectionTrait;

Expand Down
39 changes: 0 additions & 39 deletions Slim/Error/Renderers/ExceptionRendererTrait.php

This file was deleted.

66 changes: 0 additions & 66 deletions Slim/Error/Renderers/JsonExceptionRenderer.php

This file was deleted.

16 changes: 0 additions & 16 deletions Slim/Interfaces/ConfigurationInterface.php

This file was deleted.

23 changes: 0 additions & 23 deletions Slim/Media/MediaType.php

This file was deleted.

91 changes: 0 additions & 91 deletions Slim/Media/MediaTypeDetector.php

This file was deleted.

Loading