Skip to content

Commit 969792e

Browse files
tests: fix deprecations
1 parent 3827ea8 commit 969792e

File tree

6 files changed

+9
-8
lines changed

6 files changed

+9
-8
lines changed

api/config/packages/api_platform.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ api_platform:
1313
graphql_playground: false
1414
formats:
1515
jsonld: ['application/ld+json']
16+
json: ['application/json']
1617
docs_formats:
1718
jsonld: ['application/ld+json']
1819
jsonopenapi: ['application/vnd.openapi+json']
@@ -27,6 +28,7 @@ api_platform:
2728
extra_properties:
2829
standard_put: true
2930
rfc_7807_compliant_errors: true
31+
use_symfony_listeners: false
3032
event_listeners_backward_compatibility_layer: false
3133
keep_legacy_inflector: false
3234
oauth:

api/config/packages/security.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ when@test:
5050
audience: '%env(OIDC_AUD)%'
5151
issuers: [ '%env(OIDC_SERVER_URL)%' ]
5252
algorithm: 'ES256'
53-
key: '%env(OIDC_JWK)%'
53+
keyset: '{"keys":[%env(OIDC_JWK)%]}'
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# See full configuration: https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#full-default-bundle-configuration
22
zenstruck_foundry:
3-
# Whether to auto-refresh proxies by default (https://symfony.com/bundles/ZenstruckFoundryBundle/current/index.html#auto-refresh)
4-
auto_refresh_proxies: true
3+
orm:
4+
reset:
5+
entity_managers: [ 'default' ]

api/phpunit.xml.dist

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,9 @@
2020
<ini name="display_errors" value="1" />
2121
<ini name="error_reporting" value="-1" />
2222
<env name="APP_ENV" value="test" force="true" />
23-
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0" />
2423
<server name="APP_ENV" value="test" force="true" />
2524
<server name="APP_DEBUG" value="false" force="true" />
2625
<server name="SHELL_VERBOSITY" value="-1" />
27-
<server name="KERNEL_CLASS" value="App\Kernel"/>
2826
</php>
2927

3028
<testsuites>
@@ -37,7 +35,7 @@
3735
</testsuite>
3836
</testsuites>
3937

40-
<source ignoreSuppressionOfDeprecations="true">
38+
<source ignoreSuppressionOfDeprecations="true" ignoreIndirectDeprecations="true">
4139
<include>
4240
<directory>src</directory>
4341
</include>

api/src/Entity/Book.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class Book
120120
example: 'https://openlibrary.org/books/OL2055137M.json'
121121
)]
122122
#[Assert\NotBlank(allowNull: false)]
123-
#[Assert\Url(protocols: ['https'])]
123+
#[Assert\Url(protocols: ['https'], requireTld: true)]
124124
#[Assert\Regex(pattern: '/^https:\/\/openlibrary.org\/books\/OL\d+[A-Z]{1}\.json$/')]
125125
#[Groups(groups: ['Book:read', 'Book:read:admin', 'Bookmark:read', 'Book:write'])]
126126
#[ORM\Column(unique: true)]

api/tests/Api/ReviewTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public function asAUserICannotAddAReviewWithValidDataOnAnInvalidBook(): void
233233
self::assertJsonContains([
234234
'@type' => 'hydra:Error',
235235
'hydra:title' => 'An error occurred',
236-
'hydra:description' => 'Invalid identifier value or configuration.',
236+
'hydra:description' => 'Invalid uri variables.',
237237
]);
238238
}
239239

0 commit comments

Comments
 (0)