Skip to content

Commit f8703b0

Browse files
committed
Restored YAML config
1 parent dd2f298 commit f8703b0

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed

http_client.rst

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1391,6 +1391,23 @@ so the :doc:`Cache component </components/cache>` must be installed in your appl
13911391
.. code-block:: yaml
13921392
13931393
# config/packages/framework.yaml
1394+
framework:
1395+
http_client:
1396+
scoped_clients:
1397+
example.client:
1398+
base_uri: 'https://example.com'
1399+
caching:
1400+
cache_pool: example_cache_pool
1401+
1402+
cache:
1403+
pools:
1404+
example_cache_pool:
1405+
adapter: cache.adapter.redis_tag_aware
1406+
tags: true
1407+
1408+
.. code-block:: php
1409+
1410+
// config/packages/framework.php
13941411
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
13951412
13961413
return App::config([
@@ -1416,26 +1433,6 @@ so the :doc:`Cache component </components/cache>` must be installed in your appl
14161433
],
14171434
]);
14181435
1419-
.. code-block:: php
1420-
1421-
// config/packages/framework.php
1422-
use Symfony\Config\FrameworkConfig;
1423-
1424-
return static function (FrameworkConfig $framework): void {
1425-
$framework->httpClient()->scopedClient('example.client')
1426-
->baseUri('https://example.com')
1427-
->caching()
1428-
->cachePool('example_cache_pool')
1429-
// ...
1430-
;
1431-
1432-
$framework->cache()
1433-
->pool('example_cache_pool')
1434-
->adapter('cache.adapter.redis_tag_aware')
1435-
->tags(true)
1436-
;
1437-
};
1438-
14391436
.. code-block:: php-standalone
14401437
14411438
use Symfony\Component\Cache\Adapter\FilesystemTagAwareAdapter;

0 commit comments

Comments
 (0)