Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ee910bb

Browse filesBrowse files
committed
Merge branch '2.7' into 2.8
* 2.7: Improve functional test workflow example Added documentation about authentication for multiple firewalls under the same firewall context Fixed URLs to APIs outside of the Symfony project
2 parents 2f15432 + 534bdc5 commit ee910bb
Copy full SHA for ee910bb

File tree

Expand file treeCollapse file tree

3 files changed

+12
-11
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+12
-11
lines changed

‎components/psr7.rst

Copy file name to clipboardExpand all lines: components/psr7.rst
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ that builds objects implementing PSR-7 interfaces from HttpFoundation objects.
3636
It also provide a default implementation using Zend Diactoros internally.
3737

3838
The following code snippet explain how to convert a :class:`Symfony\\Component\\HttpFoundation\\Request`
39-
to a Zend Diactoros :class:`Zend\\Diactoros\\ServerRequest` implementing the
40-
:class:`Psr\\Http\\Message\\ServerRequestInterface` interface::
39+
to a ``Zend\\Diactoros\\ServerRequest`` class implementing the
40+
``Psr\\Http\\Message\\ServerRequestInterface`` interface::
4141

4242
use Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory;
4343
use Symfony\Component\HttpFoundation\Request;
@@ -48,9 +48,9 @@ to a Zend Diactoros :class:`Zend\\Diactoros\\ServerRequest` implementing the
4848
$psr7Factory = new DiactorosFactory();
4949
$psrRequest = $psr7Factory->createRequest($symfonyRequest);
5050

51-
And now from a :class:`Symfony\\Component\\HttpFoundation\\Response` to a Zend
52-
Diactoros :class:`Zend\\Diactoros\\Response` implementing the :class:`Psr\\Http\\Message\\ResponseInterface`
53-
interface::
51+
And now from a :class:`Symfony\\Component\\HttpFoundation\\Response` to a
52+
``Zend\\Diactoros\\Response`` class implementing the
53+
``Psr\\Http\\Message\\ResponseInterface`` interface::
5454

5555
use Symfony\Bridge\PsrHttpMessage\Factory\DiactorosFactory;
5656
use Symfony\Component\HttpFoundation\Response;
@@ -68,8 +68,8 @@ On the other hand, the bridge provide a factory interface called
6868
that builds HttpFoundation objects from objects implementing PSR-7 interfaces.
6969

7070
The next snippet explain how to convert an object implementing the
71-
:class:`Psr\\Http\\Message\\ServerRequestInterface`
72-
interface to a :class:`Symfony\\Component\\HttpFoundation\\Request` instance::
71+
``Psr\\Http\\Message\\ServerRequestInterface`` interface to a
72+
:class:`Symfony\\Component\\HttpFoundation\\Request` instance::
7373

7474
use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory;
7575

@@ -78,7 +78,7 @@ interface to a :class:`Symfony\\Component\\HttpFoundation\\Request` instance::
7878
$httpFoundationFactory = new HttpFoundationFactory();
7979
$symfonyRequest = $httpFoundationFactory->createRequest($psrRequest);
8080

81-
From an object implementing the :class:`Psr\\Http\\Message\\ResponseInterface`
81+
From an object implementing the ``Psr\\Http\\Message\\ResponseInterface``
8282
to a :class:`Symfony\\Component\\HttpFoundation\\Response` instance::
8383

8484
use Symfony\Bridge\PsrHttpMessage\Factory\HttpFoundationFactory;

‎testing.rst

Copy file name to clipboardExpand all lines: testing.rst
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ application (from the routing to the views). They are no different from unit
124124
tests as far as PHPUnit is concerned, but they have a very specific workflow:
125125

126126
* Make a request;
127-
* Test the response;
128127
* Click on a link or submit a form;
129128
* Test the response;
130129
* Rinse and repeat.

‎testing/http_authentication.rst

Copy file name to clipboardExpand all lines: testing/http_authentication.rst
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,12 @@ needs::
113113
{
114114
$session = $this->client->getContainer()->get('session');
115115

116-
// the firewall context defaults to the firewall name
116+
$firewallName = 'secure_area';
117+
// if you don't define multiple connected firewalls, the context defaults to the firewall name
118+
// See https://symfony.com/doc/current/reference/configuration/security.html#firewall-context
117119
$firewallContext = 'secured_area';
118120

119-
$token = new UsernamePasswordToken('admin', null, $firewallContext, array('ROLE_ADMIN'));
121+
$token = new UsernamePasswordToken('admin', null, $firewallName, array('ROLE_ADMIN'));
120122
$session->set('_security_'.$firewallContext, serialize($token));
121123
$session->save();
122124

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.