Skip to content

Commit 6f01eae

Browse files
committed
config mess again
1 parent 5b4f8ac commit 6f01eae

File tree

6 files changed

+19
-12
lines changed

6 files changed

+19
-12
lines changed

src/Symfony/Bundle/DependencyInjection/Configuration.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,9 @@ public function getConfigTreeBuilder(): TreeBuilder
221221
'json' => ['mime_types' => ['application/json']], // Swagger support
222222
'html' => ['mime_types' => ['text/html']], // Swagger UI support
223223
]);
224-
$this->addFormatSection($rootNode, 'patch_formats', []);
224+
$this->addFormatSection($rootNode, 'patch_formats', [
225+
'json' => ['mime_types' => ['application/merge-patch+json']],
226+
]);
225227
$this->addFormatSection($rootNode, 'error_formats', [
226228
'jsonproblem' => ['mime_types' => ['application/problem+json']],
227229
'jsonld' => ['mime_types' => ['application/ld+json']],

tests/Fixtures/app/AppKernel.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ protected function configureContainer(ContainerBuilder $c, LoaderInterface $load
111111

112112
$loader->load(__DIR__."/config/config_{$this->getEnvironment()}.yml");
113113

114-
/* @TODO remove this check in 3.0 */
115-
if (\PHP_VERSION_ID >= 70200 && class_exists(Uuid::class) && class_exists(UuidType::class)) {
114+
if (class_exists(Uuid::class) && class_exists(UuidType::class)) {
116115
$loader->load(__DIR__.'/config/config_symfony_uid.yml');
117116
}
118117

@@ -238,7 +237,6 @@ class_exists(NativePasswordHasher::class) ? 'password_hashers' : 'encoders' => [
238237
$c->prependExtensionConfig('api_platform', ['enable_nelmio_api_doc' => true]);
239238
}
240239

241-
$loader->load(__DIR__.'/config/config.yml');
242240
$c->prependExtensionConfig('api_platform', [
243241
'mapping' => [
244242
'paths' => ['%kernel.project_dir%/../TestBundle/Resources/config/api_resources'],

tests/Fixtures/app/config/config.yml

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/Fixtures/app/config/config_common.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,3 +336,15 @@ services:
336336
class: 'ApiPlatform\Tests\Fixtures\TestBundle\MessengerHandler\Entity\MessengerWithInputHandler'
337337
tags:
338338
- { name: 'messenger.message_handler' }
339+
340+
ApiPlatform\Tests\Fixtures\TestBundle\Metadata\ProviderResourceMetadatatCollectionFactory:
341+
class: 'ApiPlatform\Tests\Fixtures\TestBundle\Metadata\ProviderResourceMetadatatCollectionFactory'
342+
decorates: api_platform.metadata.resource.metadata_collection_factory
343+
arguments: ['@ApiPlatform\Tests\Fixtures\TestBundle\Metadata\ProviderResourceMetadatatCollectionFactory.inner']
344+
345+
app.related_dummy_resource.complex_sub_query_filter:
346+
class: ApiPlatform\Tests\Fixtures\TestBundle\Filter\ComplexSubQueryFilter
347+
arguments: ['@doctrine']
348+
tags: [ { name: 'api_platform.filter', id: 'related_dummy.complex_sub_query' } ]
349+
350+
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
imports:
2-
- { resource: config_common.yml }
3-
- { resource: config_behat_orm.yml }
42
- { resource: config_sqlite.yml }

tests/Symfony/Bundle/DependencyInjection/ConfigurationTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ private function runDefaultConfigTests(array $doctrineIntegrationsToLoad = ['orm
9191
'json' => ['mime_types' => ['application/json']],
9292
'html' => ['mime_types' => ['text/html']],
9393
],
94-
'patch_formats' => [],
94+
'patch_formats' => [
95+
'json' => ['mime_types' => ['application/merge-patch+json']],
96+
],
9597
'error_formats' => [
9698
'jsonproblem' => ['mime_types' => ['application/problem+json']],
9799
'jsonld' => ['mime_types' => ['application/ld+json']],

0 commit comments

Comments
 (0)