@@ -427,6 +427,12 @@ private function loadVarnish(ContainerBuilder $container, XmlFileLoader $loader,
427
427
$ container ->setParameter ('fos_http_cache.proxy_client.varnish.options ' , $ options );
428
428
429
429
$ loader ->load ('varnish.xml ' );
430
+
431
+ $ requestFactory = isset ($ config ['http ' ]['request_factory ' ])
432
+ ? new Reference ($ config ['http ' ]['request_factory ' ])
433
+ : null ;
434
+ $ container ->getDefinition ('fos_http_cache.proxy_client.varnish ' )
435
+ ->replaceArgument (2 , $ requestFactory );
430
436
}
431
437
432
438
private function loadNginx (ContainerBuilder $ container , XmlFileLoader $ loader , array $ config ): void
@@ -436,6 +442,12 @@ private function loadNginx(ContainerBuilder $container, XmlFileLoader $loader, a
436
442
'purge_location ' => $ config ['purge_location ' ],
437
443
]);
438
444
$ loader ->load ('nginx.xml ' );
445
+
446
+ $ requestFactory = isset ($ config ['http ' ]['request_factory ' ])
447
+ ? new Reference ($ config ['http ' ]['request_factory ' ])
448
+ : null ;
449
+ $ container ->getDefinition ('fos_http_cache.proxy_client.nginx ' )
450
+ ->replaceArgument (2 , $ requestFactory );
439
451
}
440
452
441
453
private function loadSymfony (ContainerBuilder $ container , XmlFileLoader $ loader , array $ config ): void
@@ -462,6 +474,12 @@ private function loadSymfony(ContainerBuilder $container, XmlFileLoader $loader,
462
474
$ container ->setParameter ('fos_http_cache.proxy_client.symfony.options ' , $ options );
463
475
464
476
$ loader ->load ('symfony.xml ' );
477
+
478
+ $ requestFactory = isset ($ config ['http ' ]['request_factory ' ])
479
+ ? new Reference ($ config ['http ' ]['request_factory ' ])
480
+ : null ;
481
+ $ container ->getDefinition ('fos_http_cache.proxy_client.symfony ' )
482
+ ->replaceArgument (2 , $ requestFactory );
465
483
}
466
484
467
485
private function loadCloudflare (ContainerBuilder $ container , XmlFileLoader $ loader , array $ config ): void
@@ -475,6 +493,12 @@ private function loadCloudflare(ContainerBuilder $container, XmlFileLoader $load
475
493
$ container ->setParameter ('fos_http_cache.proxy_client.cloudflare.options ' , $ options );
476
494
477
495
$ loader ->load ('cloudflare.xml ' );
496
+
497
+ $ requestFactory = isset ($ config ['http ' ]['request_factory ' ])
498
+ ? new Reference ($ config ['http ' ]['request_factory ' ])
499
+ : null ;
500
+ $ container ->getDefinition ('fos_http_cache.proxy_client.cloudflare ' )
501
+ ->replaceArgument (2 , $ requestFactory );
478
502
}
479
503
480
504
private function loadCloudfront (ContainerBuilder $ container , XmlFileLoader $ loader , array $ config ): void
@@ -511,6 +535,12 @@ private function loadFastly(ContainerBuilder $container, XmlFileLoader $loader,
511
535
$ container ->setParameter ('fos_http_cache.proxy_client.fastly.options ' , $ options );
512
536
513
537
$ loader ->load ('fastly.xml ' );
538
+
539
+ $ requestFactory = isset ($ config ['http ' ]['request_factory ' ])
540
+ ? new Reference ($ config ['http ' ]['request_factory ' ])
541
+ : null ;
542
+ $ container ->getDefinition ('fos_http_cache.proxy_client.fastly ' )
543
+ ->replaceArgument (2 , $ requestFactory );
514
544
}
515
545
516
546
/**
0 commit comments