Skip to content

Commit

Permalink
upgrade to standalone packages
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Sep 28, 2024
1 parent e2496e6 commit 8b139ef
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions core/upgrade-guide.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Upgrade Guide

## API Platform 3.4
## API Platform 3.4

Remove the `keep_legacy_inflector`, the `event_listeners_backward_compatibility_layer` and the `rfc_7807_compliant_errors` flag:

Expand All @@ -17,8 +17,8 @@ If you use a custom normalizer for validation exception use:

```yaml
api_platform:
validator:
legacy_validation_exception: true
validator:
legacy_validation_exception: true
```
Indeed, we will throw another validation class in API Platform 4 we will throw `ApiPlatform\Validator\Exception\ValidationException` instead of `ApiPlatform\Symfony\Validator\Exception\ValidationException`
Expand All @@ -27,7 +27,7 @@ It's really important to add the `use_symfony_listeners` flag, set to `true` if

```yaml
api_platform:
use_symfony_listeners: false
use_symfony_listeners: false
```

The `keep_legacy_inflector` flag will be removed from API Platform 4, you need to fix your issues first. In API Platform 3.4, the Inflector is available as a service that you can configure through:
Expand Down Expand Up @@ -55,6 +55,20 @@ api_platform:
standard_put: true
```

We recommend using the standalone API Platform packages instead of the Core monolithic repository.

Update your `composer.json` like that:

```patch
{
"require": {
- "api-platform/core": "^3",
+ "api-platform/symfony": "^3 || ^4"
+ // also add the extra packages you need, like "api-platform/doctrine-orm"
}
}
```

## API Platform 3.1/3.2

This is the recommended configuration for API Platform 3.2. We review each of these changes in this document.
Expand Down

0 comments on commit 8b139ef

Please sign in to comment.