@@ -430,6 +430,10 @@ private function loadVarnish(ContainerBuilder $container, XmlFileLoader $loader,
430430 $ container ->setParameter ('fos_http_cache.proxy_client.varnish.options ' , $ options );
431431
432432 $ loader ->load ('varnish.xml ' );
433+
434+ $ requestFactory = $ config ['http ' ]['request_factory ' ] ? new Reference ($ config ['http ' ]['request_factory ' ]) : null ;
435+ $ container ->getDefinition ('fos_http_cache.proxy_client.varnish ' )
436+ ->replaceArgument (2 , $ requestFactory );
433437 }
434438
435439 private function loadNginx (ContainerBuilder $ container , XmlFileLoader $ loader , array $ config )
@@ -439,6 +443,10 @@ private function loadNginx(ContainerBuilder $container, XmlFileLoader $loader, a
439443 'purge_location ' => $ config ['purge_location ' ],
440444 ]);
441445 $ loader ->load ('nginx.xml ' );
446+
447+ $ requestFactory = $ config ['http ' ]['request_factory ' ] ? new Reference ($ config ['http ' ]['request_factory ' ]) : null ;
448+ $ container ->getDefinition ('fos_http_cache.proxy_client.nginx ' )
449+ ->replaceArgument (2 , $ requestFactory );
442450 }
443451
444452 private function loadSymfony (ContainerBuilder $ container , XmlFileLoader $ loader , array $ config )
@@ -465,6 +473,10 @@ private function loadSymfony(ContainerBuilder $container, XmlFileLoader $loader,
465473 $ container ->setParameter ('fos_http_cache.proxy_client.symfony.options ' , $ options );
466474
467475 $ loader ->load ('symfony.xml ' );
476+
477+ $ requestFactory = $ config ['http ' ]['request_factory ' ] ? new Reference ($ config ['http ' ]['request_factory ' ]) : null ;
478+ $ container ->getDefinition ('fos_http_cache.proxy_client.symfony ' )
479+ ->replaceArgument (2 , $ requestFactory );
468480 }
469481
470482 private function loadCloudflare (ContainerBuilder $ container , XmlFileLoader $ loader , array $ config )
@@ -478,6 +490,10 @@ private function loadCloudflare(ContainerBuilder $container, XmlFileLoader $load
478490 $ container ->setParameter ('fos_http_cache.proxy_client.cloudflare.options ' , $ options );
479491
480492 $ loader ->load ('cloudflare.xml ' );
493+
494+ $ requestFactory = $ config ['http ' ]['request_factory ' ] ? new Reference ($ config ['http ' ]['request_factory ' ]) : null ;
495+ $ container ->getDefinition ('fos_http_cache.proxy_client.cloudflare ' )
496+ ->replaceArgument (2 , $ requestFactory );
481497 }
482498
483499 private function loadCloudfront (ContainerBuilder $ container , XmlFileLoader $ loader , array $ config )
@@ -514,6 +530,10 @@ private function loadFastly(ContainerBuilder $container, XmlFileLoader $loader,
514530 $ container ->setParameter ('fos_http_cache.proxy_client.fastly.options ' , $ options );
515531
516532 $ loader ->load ('fastly.xml ' );
533+
534+ $ requestFactory = $ config ['http ' ]['request_factory ' ] ? new Reference ($ config ['http ' ]['request_factory ' ]) : null ;
535+ $ container ->getDefinition ('fos_http_cache.proxy_client.fastly ' )
536+ ->replaceArgument (2 , $ requestFactory );
517537 }
518538
519539 /**
0 commit comments