@@ -430,6 +430,12 @@ private function loadVarnish(ContainerBuilder $container, XmlFileLoader $loader,
430
430
$ container ->setParameter ('fos_http_cache.proxy_client.varnish.options ' , $ options );
431
431
432
432
$ 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 );
433
439
}
434
440
435
441
private function loadNginx (ContainerBuilder $ container , XmlFileLoader $ loader , array $ config )
@@ -439,6 +445,12 @@ private function loadNginx(ContainerBuilder $container, XmlFileLoader $loader, a
439
445
'purge_location ' => $ config ['purge_location ' ],
440
446
]);
441
447
$ 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 );
442
454
}
443
455
444
456
private function loadSymfony (ContainerBuilder $ container , XmlFileLoader $ loader , array $ config )
@@ -465,6 +477,12 @@ private function loadSymfony(ContainerBuilder $container, XmlFileLoader $loader,
465
477
$ container ->setParameter ('fos_http_cache.proxy_client.symfony.options ' , $ options );
466
478
467
479
$ 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 );
468
486
}
469
487
470
488
private function loadCloudflare (ContainerBuilder $ container , XmlFileLoader $ loader , array $ config )
@@ -478,6 +496,12 @@ private function loadCloudflare(ContainerBuilder $container, XmlFileLoader $load
478
496
$ container ->setParameter ('fos_http_cache.proxy_client.cloudflare.options ' , $ options );
479
497
480
498
$ 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 );
481
505
}
482
506
483
507
private function loadCloudfront (ContainerBuilder $ container , XmlFileLoader $ loader , array $ config )
@@ -514,6 +538,12 @@ private function loadFastly(ContainerBuilder $container, XmlFileLoader $loader,
514
538
$ container ->setParameter ('fos_http_cache.proxy_client.fastly.options ' , $ options );
515
539
516
540
$ 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 );
517
547
}
518
548
519
549
/**
0 commit comments