8000 Merge branch '4.4' into 5.2 · Tobion/symfony-docs@c97ab7b · GitHub
[go: up one dir, main page]

Skip to content

Commit c97ab7b

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: Upgrade popper package to v2 Add missing configurations
2 parents afb5817 + 9afbba0 commit c97ab7b

File tree

2 files changed

+106
-19
lines changed

2 files changed

+106
-19
lines changed

frontend/encore/bootstrap.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ used in your application:
4343
.. code-block:: terminal
4444
4545
// jQuery is only required in versions prior to Bootstrap 5
46-
$ yarn add jquery popper.js --dev
46+
$ yarn add jquery @popperjs/core --dev
4747
4848
Now, require bootstrap from any of your JavaScript files:
4949

reference/configuration/framework.rst

Lines changed: 105 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -784,16 +784,62 @@ as a service named ``http_client`` or using the autowiring alias
784784

785785
This service can be configured using ``framework.http_client.default_options``:
786786

787-
.. code-block:: yaml
787+
.. configuration-block::
788788

789-
# config/packages/framework.yaml
790-
framework:
791-
# ...
792-
http_client:
793-
max_host_connections: 10
794-
default_options:
795-
headers: { 'X-Powered-By': 'ACME App' }
796-
max_redirects: 7
789+
.. code-block:: yaml
790+
791+
# config/packages/framework.yaml
792+
framework:
793+
# ...
794+
http_client:
795+
max_host_connections: 10
796+
default_options:
797+
headers: { 'X-Powered-By': 'ACME App' }
798+
max_redirects: 7
799+
800+
.. code-block:: xml
801+
802+
<!-- config/packages/framework.xml -->
803+
<?xml version="1.0" encoding="UTF-8" ?>
804+
<container xmlns="http://symfony.com/schema/dic/services"
805+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
806+
xmlns:framework="http://symfony.com/schema/dic/symfony"
807+
xsi:schemaLocation="http://symfony.com/schema/dic/services
808+
https://symfony.com/schema/dic/services/services-1.0.xsd
809+
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
810+
811+
<framework:config>
812+
<framework:http-client max-host-connections="10">
813+
<framework:default-options max-redirects="7">
814+
<framework:header name="X-Powered-By">ACME App</framework:header>
815+
</framework:default-options>
816+
</framework:http-client>
817+
</framework:config>
818+
</container>
819+
820+
.. code-block:: php
821+
822+
// config/packages/framework.php
823+
$container->loadFromExtension('framework', [
824+
'http_client' => [
825+
'max_host_connections' => 10,
826+
'default_options' => [
827+
'headers' => [
828+
'X-Powered-By' => 'ACME App',
829+
],
830+
'max_redirects' => 7,
831+
],
832+
],
833+
]);
834+
835+
.. code-block:: php-standalone
836+
837+
$client = HttpClient::create([
838+
'headers' => [
839+
'X-Powered-By' => 'ACME App',
840+
],
841+
'max_redirects' => 7,
842+
], 10);
797843
798844
.. _reference-http-client-scoped-clients:
799845

@@ -802,16 +848,57 @@ service name defined as a key under ``scoped_clients``. Scoped clients inherit
802848
the default options defined for the ``http_client`` service. You can override
803849
these options and can define a few others:
804850

805-
.. code-block:: yaml
851+
.. configuration-block::
806852

807-
# config/packages/framework.yaml
808-
framework:
809-
# ...
810-
http_client:
811-
scoped_clients:
812-
my_api.client:
813-
auth_bearer: secret_bearer_token
814-
# ...
853+
.. code-block:: yaml
854+
855+
# config/packages/framework.yaml
856+
framework:
857+
# ...
858+
http_client:
859+
scoped_clients:
860+
my_api.client:
861+
auth_bearer: secret_bearer_token
862+
# ...
863+
864+
.. code-block:: xml
865+
866+
<!-- config/packages/framework.xml -->
867+
<?xml version="1.0" encoding="UTF-8" ?>
868+
<container xmlns="http://symfony.com/schema/dic/services"
869+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
870+
xmlns:framework="http://symfony.com/schema/dic/symfony"
871+
xsi:schemaLocation="http://symfony.com/schema/dic/services
872+
https://symfony.com/schema/dic/services/services-1.0.xsd
873+
http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
874+
875+
<framework:config>
876+
<framework:http-client>
877+
<framework:scoped-client name="my_api.client" auth-bearer="secret_bearer_token"/>
878+
</framework:http-client>
879+
</framework:config>
880+
</container>
881+
882+
.. code-block:: php
883+
884+
// config/packages/framework.php
885+
$container->loadFromExtension('framework', [
886+
'http_client' => [
887+
'scoped_clients' => [
888+
'my_api.client' => [
889+
'auth_bearer' => 'secret_bearer_token',
890+
// ...
891+
],
892+
],
893+
],
894+
]);
895+
896+
.. code-block:: php-standalone
897+
898+
$client = HttpClient::createForBaseUri('https://...', [
899+
'auth_bearer' => 'secret_bearer_token',
900+
// ...
901+
]);
815902
816903
Options defined for scoped clients apply only to URLs that match either their
817904
`base_uri`_ or the `scope`_ option when it is defined. Non-matching URLs always

0 commit comments

Comments
 (0)
0