Skip to content

Commit

Permalink
Update Api Platform to 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jskowronski39 committed Jan 19, 2024
1 parent 8d7e3a8 commit f6e3815
Show file tree
Hide file tree
Showing 5 changed files with 89 additions and 106 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"ext-ctype": "*",
"ext-dom": "*",
"ext-iconv": "*",
"api-platform/core": "^2.7",
"api-platform/core": "^3.2",
"discord-php/http": "^10.3",
"doctrine/doctrine-bundle": "^2.11",
"doctrine/doctrine-fixtures-bundle": "^3.4",
Expand Down
142 changes: 69 additions & 73 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
Expand Up @@ -15,6 +15,6 @@
KnpU\OAuth2ClientBundle\KnpUOAuth2ClientBundle::class => ['all' => true],
FOS\JsRoutingBundle\FOSJsRoutingBundle::class => ['all' => true],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
];
41 changes: 14 additions & 27 deletions config/packages/api_platform.yaml
Original file line number Diff line number Diff line change
@@ -1,31 +1,18 @@
imports:
- { resource: ../api_platform/filters/ }

api_platform:
title: "%app.api.name%"
version: "%app.api.version%"
show_webby: false
swagger:
versions: [3]
api_keys:
apiKey:
name: '%env(APP_SECURITY_API_KEY_HEADER_NAME)%'
type: header

path_segment_name_generator: api_platform.path_segment_name_generator.dash
mapping:
paths: ['%kernel.project_dir%/config/api_platform/resources']
patch_formats:
json: ['application/merge-patch+json']
title: Hello API Platform
version: 1.0.0
formats:
json: ['application/json']
jsonld: ['application/ld+json']
docs_formats:
jsonld: ['application/ld+json']
jsonopenapi: ['application/vnd.openapi+json']
html: ['text/html']

defaults:
pagination_enabled: true
pagination_maximum_items_per_page: 50
pagination_client_items_per_page: true
collection:
pagination:
items_per_page_parameter_name: limit
page_parameter_name: page
stateless: true
cache_headers:
vary: ['Content-Type', 'Authorization', 'Origin']
extra_properties:
standard_put: true
rfc_7807_compliant_errors: true
event_listeners_backward_compatibility_layer: false
keep_legacy_inflector: false
8 changes: 4 additions & 4 deletions symfony.lock
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"api-platform/core": {
"version": "2.7",
"version": "3.2",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "2.5",
"ref": "05b57782a78c21a664a42055dc11cf1954ca36bb"
"version": "3.2",
"ref": "696d44adc3c0d4f5d25a2f1c4f3700dd8a5c6db9"
},
"files": [
"config/packages/api_platform.yaml",
"config/routes/api_platform.yaml",
"src/Entity/.gitignore"
"src/ApiResource/.gitignore"
]
},
"codeception/codeception": {
Expand Down

0 comments on commit f6e3815

Please sign in to comment.