Skip to content

Commit 691c082

Browse files
committed
Merge branch '3.4' into 4.1
* 3.4: typo fix in speaker mentoring Improved the article about session flashes add example for cache pool configuration Added link to bcrypt (Uncyclopedia) Added a caution note about the checkMX option clarify the datetime format option You do not need to re-add the command
2 parents e0748e3 + 6a5a17a commit 691c082

File tree

7 files changed

+74
-45
lines changed

7 files changed

+74
-45
lines changed

console.rst

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -335,11 +335,9 @@ console::
335335
{
336336
public function testExecute()
337337
{
338-
$kernel = self::bootKernel();
338+
$kernel = static::createKernel();
339339
$application = new Application($kernel);
340340

341-
$application->add(new CreateUserCommand());
342-
343341
$command = $application->find('app:create-user');
344342
$commandTester = new CommandTester($command);
345343
$commandTester->execute(array(
@@ -371,38 +369,6 @@ console::
371369
:class:`Symfony\\Component\\Console\\Application <Symfony\\Component\\Console\\Application>`
372370
and extend the normal ``\PHPUnit\Framework\TestCase``.
373371

374-
To be able to use the fully set up service container for your console tests
375-
you can extend your test from
376-
:class:`Symfony\\Bundle\\FrameworkBundle\\Test\\KernelTestCase`::
377-
378-
// ...
379-
use Symfony\Component\Console\Tester\CommandTester;
380-
use Symfony\Bundle\FrameworkBundle\Console\Application;
381-
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
382-
383-
class CreateUserCommandTest extends KernelTestCase
384-
{
385-
public function testExecute()
386-
{
387-
$kernel = static::createKernel();
388-
$kernel->boot();
389-
390-
$application = new Application($kernel);
391-
392-
$command = $application->find('app:create-user');
393-
$commandTester = new CommandTester($command);
394-
$commandTester->execute(array(
395-
'command' => $command->getName(),
396-
'username' => 'Wouter',
397-
));
398-
399-
$output = $commandTester->getDisplay();
400-
$this->assertContains('Username: Wouter', $output);
401-
402-
// ...
403-
}
404-
}
405-
406372
Learn More
407373
----------
408374

contributing/community/speaker-mentoring.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public speaker. They can even do practice runs via video chat!
3333
Furthermore, they can also be an ally when it comes to the day of
3434
giving the talk at a conference!
3535

36-
A great resource with advice on everything related to`public speaking`_
36+
A great resource with advice on everything related to `public speaking`_
3737
is a collection of links maintained by VM (Vicky) Brasseur. It covers
3838
everything from finding a conference call for proposals, how to
3939
refine a proposal, to how to put together slide decks to practical

doctrine/registration_form.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ encoder in the security configuration:
324324
),
325325
));
326326
327-
In this case the recommended ``bcrypt`` algorithm is used. If needed, check out
327+
In this case the recommended `bcrypt`_ algorithm is used. If needed, check out
328328
the :ref:`user password encoding <security-encoding-user-password>` article.
329329

330330
Next, create the template:
@@ -422,3 +422,4 @@ us to add validation, even though there is no ``termsAccepted`` property on ``Us
422422

423423
.. _`CVE-2013-5750`: https://symfony.com/blog/cve-2013-5750-security-issue-in-fosuserbundle-login-form
424424
.. _`FOSUserBundle`: https://github.com/FriendsOfSymfony/FOSUserBundle
425+
.. _`bcrypt`: https://en.wikipedia.org/wiki/Bcrypt

reference/configuration/framework.rst

Lines changed: 59 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1906,6 +1906,57 @@ A list of cache pools to be created by the framework extension.
19061906

19071907
For more information about how pools works, see :ref:`cache pools <component-cache-cache-pools>`.
19081908

1909+
To configure a Redis cache pool with a default lifetime of 1 hour, do the following:
1910+
1911+
.. configuration-block::
1912+
1913+
.. code-block:: yaml
1914+
1915+
# config/packages/framework.yaml
1916+
framework:
1917+
cache:
1918+
pools:
1919+
cache.mycache:
1920+
adapter: cache.adapter.redis
1921+
default_lifetime: 3600
1922+
1923+
.. code-block:: xml
1924+
1925+
<!-- config/packages/framework.xml -->
1926+
<?xml version="1.0" encoding="UTF-8" ?>
1927+
<container xmlns="http://symfony.com/schema/dic/services"
1928+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1929+
xmlns:framework="http://symfony.com/schema/dic/symfony"
1930+
xsi:schemaLocation="http://symfony.com/schema/dic/services
1931+
http://symfony.com/schema/dic/services/services-1.0.xsd
1932+
http://symfony.com/schema/dic/symfony http://symfony.com/schema/dic/symfony/symfony-1.0.xsd">
1933+
1934+
<framework:config>
1935+
<framework:cache>
1936+
<framework:pool
1937+
name="cache.mycache"
1938+
adapter="cache.adapter.redis"
1939+
default-lifetime=3600
1940+
/>
1941+
</framework:cache>
1942+
<!-- ... -->
1943+
</framework:config>
1944+
</container>
1945+
1946+
.. code-block:: php
1947+
1948+
// config/packages/framework.php
1949+
$container->loadFromExtension('framework', array(
1950+
'cache' => array(
1951+
'pools' => array(
1952+
'cache.mycache' => array(
1953+
'adapter' => 'cache.adapter.redis',
1954+
'default_lifetime' => 3600,
1955+
),
1956+
),
1957+
),
1958+
));
1959+
19091960
.. _reference-cache-pools-name:
19101961

19111962
name
@@ -1924,7 +1975,10 @@ adapter
19241975

19251976
**type**: ``string`` **default**: ``cache.app``
19261977

1927-
The name of the adapter to use. You could also use your own implementation.
1978+
The service name of the adapter to use. You can specify one of the default
1979+
services that follow the pattern ``cache.adapter.[type]``. Alternatively you
1980+
can specify another cache pool as base, which will make this pool inherit the
1981+
settings from the base pool as defaults.
19281982

19291983
.. note::
19301984

@@ -1960,7 +2014,10 @@ provider
19602014

19612015
**type**: ``string``
19622016

1963-
The service name to use as provider when the specified adapter needs one.
2017+
Overwrite the default service name or DSN respectively, if you do not want to
2018+
use what is configured as ``default_X_provider`` under ``cache``. See the
2019+
description of the default provider setting above for the type of adapter
2020+
you use for information on how to specify the provider.
19642021

19652022
clearer
19662023
"""""""

reference/constraints/Email.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ checkMX
137137
If true, then the :phpfunction:`checkdnsrr` PHP function will be used to
138138
check the validity of the MX record of the host of the given email.
139139

140+
.. caution::
141+
142+
This option is not reliable because it depends on the network conditions
143+
and some valid servers refuse to respond to those requests.
144+
140145
checkHost
141146
~~~~~~~~~
142147

reference/forms/types/datetime.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,10 @@ format
108108

109109
If the ``widget`` option is set to ``single_text``, this option specifies
110110
the format of the input, i.e. how Symfony will interpret the given input
111-
as a datetime string. It defaults to the `RFC 3339`_ format which is used
112-
by the HTML5 ``datetime`` field. Keeping the default value will cause the
113-
field to be rendered as an ``input`` field with ``type="datetime"``. For
114-
more information on valid formats, see `Date/Time Format Syntax`_.
111+
as a datetime string. It defaults to the `datetime local`_ format which is
112+
used by the HTML5 ``datetime-local`` field. Keeping the default value will
113+
cause the field to be rendered as an ``input`` field with ``type="datetime-local"``.
114+
For more information on valid formats, see `Date/Time Format Syntax`_.
115115

116116
.. include:: /reference/forms/types/options/hours.rst.inc
117117

@@ -218,5 +218,5 @@ Field Variables
218218
| | | contains the input type to use (``datetime``, ``date`` or ``time``). |
219219
+----------+------------+----------------------------------------------------------------------+
220220

221-
.. _`RFC 3339`: https://tools.ietf.org/html/rfc3339
221+
.. _`datetime local`: http://w3c.github.io/html-reference/datatypes.html#form.data.datetime-local
222222
.. _`Date/Time Format Syntax`: http://userguide.icu-project.org/formatparse/datetime#TOC-Date-Time-Format-Syntax

session/avoid_session_start.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ access the flash messages:
2929

3030
.. code-block:: html+twig
3131

32-
{% if app.request.hasPreviousSession %}
32+
{% if app.request.method == 'POST' %}
3333
{% for message in app.flashes('notice') %}
3434
<div class="flash-notice">
3535
{{ message }}

0 commit comments

Comments
 (0)