Skip to content

Commit b760612

Browse files
committed
Merge branch '2.4'
Conflicts: components/console/helpers/dialoghelper.rst
2 parents 00f60a8 + bbfdb21 commit b760612

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

components/console/helpers/dialoghelper.rst

+2-1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ method::
118118
'The name of the bundle should be suffixed with \'Bundle\''
119119
);
120120
}
121+
121122
return $answer;
122123
},
123124
false,
@@ -154,7 +155,7 @@ You can also ask and validate a hidden response::
154155
$dialog = $this->getHelperSet()->get('dialog');
155156

156157
$validator = function ($value) {
157-
if (trim($value) == '') {
158+
if ('' === trim($value)) {
158159
throw new \Exception('The password can not be empty');
159160
}
160161

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
@@ -279,3 +279,19 @@ You can also set the host option on imported routes:
279279
280280
The host ``hello.example.com`` will be set on each route loaded from the new
281281
routing resource.
282+
283+
Testing your Controllers
284+
------------------------
285+
286+
You need to set the Host HTTP header on your request objects if you want to get
287+
past url matching in your functional tests.
288+
289+
.. code-block:: php
290+
291+
$crawler = $client->request(
292+
'GET',
293+
'/homepage',
294+
array(),
295+
array(),
296+
array('HTTP_HOST' => 'm.' . $client->getContainer()->getParameter('domain'))
297+
);

0 commit comments

Comments
 (0)