@@ -430,6 +430,12 @@ 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 = isset ($ config ['http ' ]['request_factory ' ])
435+ ? new Reference ($ config ['http ' ]['request_factory ' ])
436+ : null ;
437+ $ container ->getDefinition ('fos_http_cache.proxy_client.varnish ' )
438+ ->replaceArgument (2 , $ requestFactory );
433439 }
434440
435441 private function loadNginx (ContainerBuilder $ container , XmlFileLoader $ loader , array $ config )
@@ -439,6 +445,12 @@ private function loadNginx(ContainerBuilder $container, XmlFileLoader $loader, a
439445 'purge_location ' => $ config ['purge_location ' ],
440446 ]);
441447 $ loader ->load ('nginx.xml ' );
448+
449+ $ requestFactory = isset ($ config ['http ' ]['request_factory ' ])
450+ ? new Reference ($ config ['http ' ]['request_factory ' ])
451+ : null ;
452+ $ container ->getDefinition ('fos_http_cache.proxy_client.nginx ' )
453+ ->replaceArgument (2 , $ requestFactory );
442454 }
443455
444456 private function loadSymfony (ContainerBuilder $ container , XmlFileLoader $ loader , array $ config )
@@ -465,6 +477,12 @@ private function loadSymfony(ContainerBuilder $container, XmlFileLoader $loader,
465477 $ container ->setParameter ('fos_http_cache.proxy_client.symfony.options ' , $ options );
466478
467479 $ loader ->load ('symfony.xml ' );
480+
481+ $ requestFactory = isset ($ config ['http ' ]['request_factory ' ])
482+ ? new Reference ($ config ['http ' ]['request_factory ' ])
483+ : null ;
484+ $ container ->getDefinition ('fos_http_cache.proxy_client.symfony ' )
485+ ->replaceArgument (2 , $ requestFactory );
468486 }
469487
470488 private function loadCloudflare (ContainerBuilder $ container , XmlFileLoader $ loader , array $ config )
@@ -478,6 +496,12 @@ private function loadCloudflare(ContainerBuilder $container, XmlFileLoader $load
478496 $ container ->setParameter ('fos_http_cache.proxy_client.cloudflare.options ' , $ options );
479497
480498 $ loader ->load ('cloudflare.xml ' );
499+
500+ $ requestFactory = isset ($ config ['http ' ]['request_factory ' ])
501+ ? new Reference ($ config ['http ' ]['request_factory ' ])
502+ : null ;
503+ $ container ->getDefinition ('fos_http_cache.proxy_client.cloudflare ' )
504+ ->replaceArgument (2 , $ requestFactory );
481505 }
482506
483507 private function loadCloudfront (ContainerBuilder $ container , XmlFileLoader $ loader , array $ config )
@@ -514,6 +538,12 @@ private function loadFastly(ContainerBuilder $container, XmlFileLoader $loader,
514538 $ container ->setParameter ('fos_http_cache.proxy_client.fastly.options ' , $ options );
515539
516540 $ loader ->load ('fastly.xml ' );
541+
542+ $ requestFactory = isset ($ config ['http ' ]['request_factory ' ])
543+ ? new Reference ($ config ['http ' ]['request_factory ' ])
544+ : null ;
545+ $ container ->getDefinition ('fos_http_cache.proxy_client.fastly ' )
546+ ->replaceArgument (2 , $ requestFactory );
517547 }
518548
519549 /**
0 commit comments