Skip to content

Commit

Permalink
Merge branch '2.4'
Browse files Browse the repository at this point in the history
Conflicts:
	components/console/helpers/dialoghelper.rst
  • Loading branch information
weaverryan committed May 12, 2014
2 parents 00f60a8 + bbfdb21 commit b760612
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/console/helpers/dialoghelper.rst
Expand Up @@ -118,6 +118,7 @@ method::
'The name of the bundle should be suffixed with \'Bundle\''
);
}

return $answer;
},
false,
Expand Down Expand Up @@ -154,7 +155,7 @@ You can also ask and validate a hidden response::
$dialog = $this->getHelperSet()->get('dialog');

$validator = function ($value) {
if (trim($value) == '') {
if ('' === trim($value)) {
throw new \Exception('The password can not be empty');
}

Expand Down
6 changes: 6 additions & 0 deletions components/http_foundation/sessions.rst
Expand Up @@ -12,6 +12,12 @@ object-oriented interface using a variety of session storage drivers.
Sessions are used via the simple :class:`Symfony\\Component\\HttpFoundation\\Session\\Session`
implementation of :class:`Symfony\\Component\\HttpFoundation\\Session\\SessionInterface` interface.

.. caution::

Make sure your PHP session isn't already started before using the Session
class. If you have a legacy session system that starts your session, see
http://symfony.com/doc/current/components/http_foundation/session_php_bridge.html

Quick example::

use Symfony\Component\HttpFoundation\Session\Session;
Expand Down
16 changes: 16 additions & 0 deletions components/routing/hostname_pattern.rst
Expand Up @@ -279,3 +279,19 @@ You can also set the host option on imported routes:
The host ``hello.example.com`` will be set on each route loaded from the new
routing resource.

Testing your Controllers
------------------------

You need to set the Host HTTP header on your request objects if you want to get
past url matching in your functional tests.

.. code-block:: php
$crawler = $client->request(
'GET',
'/homepage',
array(),
array(),
array('HTTP_HOST' => 'm.' . $client->getContainer()->getParameter('domain'))
);

0 comments on commit b760612

Please sign in to comment.