Skip to content

Commit bbfdb21

Browse files
committed
Merge branch '2.3' into 2.4
2 parents a669d83 + 5c74318 commit bbfdb21

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

components/console/helpers/dialoghelper.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ method::
117117
'The name of the bundle should be suffixed with \'Bundle\''
118118
);
119119
}
120+
120121
return $answer;
121122
},
122123
false,
@@ -156,9 +157,11 @@ You can also ask and validate a hidden response::
156157
$dialog = $this->getHelperSet()->get('dialog');
157158

158159
$validator = function ($value) {
159-
if (trim($value) == '') {
160+
if ('' === trim($value)) {
160161
throw new \Exception('The password can not be empty');
161162
}
163+
164+
return $value;
162165
};
163166

164167
$password = $dialog->askHiddenResponseAndValidate(

components/http_foundation/sessions.rst

+6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ object-oriented interface using a variety of session storage drivers.
1212
Sessions are used via the simple :class:`Symfony\\Component\\HttpFoundation\\Session\\Session`
1313
implementation of :class:`Symfony\\Component\\HttpFoundation\\Session\\SessionInterface` interface.
1414

15+
.. caution::
16+
17+
Make sure your PHP session isn't already started before using the Session
18+
class. If you have a legacy session system that starts your session, see
19+
http://symfony.com/doc/current/components/http_foundation/session_php_bridge.html
20+
1521
Quick example::
1622

1723
use Symfony\Component\HttpFoundation\Session\Session;

components/routing/hostname_pattern.rst

+16
Original file line numberDiff line numberDiff line change
@@ -282,3 +282,19 @@ You can also set the host option on imported routes:
282282
283283
The host ``hello.example.com`` will be set on each route loaded from the new
284284
routing resource.
285+
286+
Testing your Controllers
287+
------------------------
288+
289+
You need to set the Host HTTP header on your request objects if you want to get
290+
past url matching in your functional tests.
291+
292+
.. code-block:: php
293+
294+
$crawler = $client->request(
295+
'GET',
296+
'/homepage',
297+
array(),
298+
array(),
299+
array('HTTP_HOST' => 'm.' . $client->getContainer()->getParameter('domain'))
300+
);

0 commit comments

Comments
 (0)