Skip to content

Commit

Permalink
chore: upgrade chore to 3.2 beta 1
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Sep 20, 2023
1 parent 2b3a1d3 commit 5edbcb9
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 17 deletions.
2 changes: 1 addition & 1 deletion api/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"php": ">=8.2",
"ext-ctype": "*",
"ext-iconv": "*",
"api-platform/core": "^3.1",
"api-platform/core": "^3.2@beta",
"doctrine/doctrine-bundle": "^2.7",
"doctrine/doctrine-migrations-bundle": "^3.2",
"doctrine/orm": "^2.12",
Expand Down
23 changes: 13 additions & 10 deletions api/composer.lock

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

9 changes: 9 additions & 0 deletions api/config/packages/api_platform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,19 @@ api_platform:
version: 1.0.0
# Mercure integration, remove if unwanted
mercure: ~
formats:
jsonld: ['application/ld+json']
docs_formats:
jsonld: ['application/ld+json']
jsonopenapi: ['application/vnd.openapi+json']
html: ['text/html']
# Good defaults for REST APIs
defaults:
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
6 changes: 3 additions & 3 deletions api/symfony.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"api-platform/core": {
"version": "3.1",
"version": "3.2",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "3.1",
"ref": "adf0c75f4bed8b0043a6680376323404953578c5"
"version": "3.2",
"ref": "696d44adc3c0d4f5d25a2f1c4f3700dd8a5c6db9"
},
"files": [
"config/packages/api_platform.yaml",
Expand Down
11 changes: 8 additions & 3 deletions api/tests/Api/GreetingsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@ class GreetingsTest extends ApiTestCase
{
public function testCreateGreeting(): void
{
static::createClient()->request('POST', '/greetings', ['json' => [
'name' => 'Kévin',
]]);
static::createClient()->request('POST', '/greetings', [
'json' => [
'name' => 'Kévin',
],
'headers' => [
'Content-Type' => 'application/ld+json',
],
]);

$this->assertResponseStatusCodeSame(201);
$this->assertJsonContains([
Expand Down

0 comments on commit 5edbcb9

Please sign in to comment.