@@ -125,7 +125,7 @@ public function load(array $configs, ContainerBuilder $container): void
125
125
$ this ->registerOAuthConfiguration ($ container , $ config );
126
126
$ this ->registerOpenApiConfiguration ($ container , $ config , $ loader );
127
127
$ this ->registerSwaggerConfiguration ($ container , $ config , $ loader );
128
- $ this ->registerJsonApiConfiguration ($ formats , $ loader );
128
+ $ this ->registerJsonApiConfiguration ($ formats , $ loader, $ config );
129
129
$ this ->registerJsonLdHydraConfiguration ($ container , $ formats , $ loader , $ config );
130
130
$ this ->registerJsonHalConfiguration ($ formats , $ loader );
131
131
$ this ->registerJsonProblemConfiguration ($ errorFormats , $ loader );
@@ -467,7 +467,7 @@ private function registerSwaggerConfiguration(ContainerBuilder $container, array
467
467
$ container ->setParameter ('api_platform.swagger_ui.extra_configuration ' , $ config ['openapi ' ]['swagger_ui_extra_configuration ' ] ?: $ config ['swagger ' ]['swagger_ui_extra_configuration ' ]);
468
468
}
469
469
470
- private function registerJsonApiConfiguration (array $ formats , XmlFileLoader $ loader ): void
470
+ private function registerJsonApiConfiguration (array $ formats , XmlFileLoader $ loader, array $ config ): void
471
471
{
472
472
if (!isset ($ formats ['jsonapi ' ])) {
473
473
return ;
@@ -663,6 +663,10 @@ private function registerHttpCacheConfiguration(ContainerBuilder $container, arr
663
663
664
664
$ loader ->load ('http_cache_purger.xml ' );
665
665
666
+ if ($ config ['event_listeners_backward_compatibility_layer ' ] ?? true ) {
667
+ $ loader ->load ('legacy/http_cache_purger.xml ' );
668
+ }
669
+
666
670
foreach ($ config ['http_cache ' ]['invalidation ' ]['scoped_clients ' ] as $ client ) {
667
671
$ definition = $ container ->getDefinition ($ client );
668
672
$ definition ->addTag ('api_platform.http_cache.http_client ' );
0 commit comments