Skip to content

Commit 98ef2da

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: [HttpClient] HttpClientInterface::withOptions method [Session] Fix handler import
2 parents ce5f2eb + cfdbb16 commit 98ef2da

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

http_client.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,18 @@ You can configure the global options using the ``default_options`` option:
138138
'max_redirects' => 7,
139139
]);
140140
141+
You can also use the :method:`Symfony\\Contracts\\HttpClient\\HttpClientInterface::withOptions`
142+
method to retrieve a new instance of the client with new default options::
143+
144+
$this->client = $client->withOptions([
145+
'base_uri' => 'https://...',
146+
'headers' => ['header-name' => 'header-value']
147+
]);
148+
149+
.. versionadded:: 5.3
150+
151+
The ``withOptions()`` method was introduced in Symfony 5.3.
152+
141153
Some options are described in this guide:
142154

143155
* `Authentication`_

session/database.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ the MongoDB connection as argument:
497497
// config/services.php
498498
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
499499
500-
use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler;
500+
use Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandler;
501501
502502
return static function (ContainerConfigurator $container) {
503503
$services = $configurator->services();
@@ -606,7 +606,7 @@ configure these values with the second argument passed to the
606606
// config/services.php
607607
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
608608
609-
use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler;
609+
use Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandler;
610610
611611
return static function (ContainerConfigurator $container) {
612612
$services = $configurator->services();

0 commit comments

Comments
 (0)