Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update api-platform to v4 #11146

Merged
merged 2 commits into from
Feb 17, 2025
Merged
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
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -40,7 +40,7 @@
"ext-zip": "*",
"a2lix/translation-form-bundle": "^3.2",
"algolia/search-bundle": "^6.0",
"api-platform/core": "^2.7",
"api-platform/core": "^4.0",
"beberlei/doctrineextensions": "^1.2",
"cakephp/chronos": "^3.1",
"cocur/slugify": "^4.0",
199 changes: 125 additions & 74 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion config/bundles.php
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@
Knp\Bundle\TimeBundle\KnpTimeBundle::class => ['all' => true],
Exercise\HTMLPurifierBundle\ExerciseHTMLPurifierBundle::class => ['all' => true],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
DAMA\DoctrineTestBundle\DAMADoctrineTestBundle::class => ['test' => true],
22 changes: 14 additions & 8 deletions config/packages/api_platform.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
api_platform:
name_converter: serializer.name_converter.camel_case_to_snake_case
use_symfony_listeners: true
resource_class_directories:
- '%kernel.project_dir%/src/Entity'
enable_docs: true
enable_swagger_ui: true
enable_docs: false
enable_swagger_ui: false
enable_entrypoint: false
allow_plain_identifiers: true
metadata_backward_compatibility_layer: false
exception_to_status:
ApiPlatform\Core\Bridge\Symfony\Validator\Exception\ValidationException: 400
ApiPlatform\Validator\Exception\ValidationException: !php/const Symfony\Component\HttpFoundation\Response::HTTP_BAD_REQUEST
formats:
json:
mime_types: ['application/json']
@@ -17,9 +16,16 @@ api_platform:
error_formats:
jsonproblem:
mime_types: ['application/problem+json']
patch_formats:
json: ['application/json']
collection:
pagination:
items_per_page: 10
maximum_items_per_page: 30
client_items_per_page: true
items_per_page_parameter_name: page_size
defaults:
normalization_context:
skip_null_values: false
extra_properties:
standard_put: false
pagination_items_per_page: 10
pagination_maximum_items_per_page: 30
pagination_client_items_per_page: true
2 changes: 0 additions & 2 deletions config/packages/dev/api_platform.yaml

This file was deleted.

6 changes: 2 additions & 4 deletions config/packages/test/api_platform.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
api_platform:
enable_entrypoint: false
collection:
pagination:
items_per_page: 2
defaults:
pagination_items_per_page: 2
Loading