Skip to content

Commit f40bb24

Browse files
committed
Merge branch '2.4' into 2.5
* 2.4: Fixed description for session storage Added a note about the automatic handling of the memory spool in the CLI Added July changelog Added July changelog [Contributing] extended Symfony 2.4 maintenance field dependent empty_data option description add note on Symfony SE forks for bug reports Conflicts: changelog.rst
2 parents b2a70d1 + 68e022a commit f40bb24

29 files changed

+255
-42
lines changed

changelog.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ Minor Documentation Changes
5757
- `c2eda93 <https://github.com/symfony/symfony-docs/commit/c2eda939ad8681721cd1b12bcedadd1faf294725>`_ #4034 Update internals.rst (redstar504)
5858
- `a5ad0df <https://github.com/symfony/symfony-docs/commit/a5ad0dfbf9ad2dcc84e7f9c6de73c8bad2a89e2f>`_ #4035 Update version in Rework your Patch section (yguedidi)
5959
- `eed8d64 <https://github.com/symfony/symfony-docs/commit/eed8d646ad134bba1002f98800cab46d06241a05>`_ #4026 Updating Symfony version from 2.4 to 2.5 (danielsan)
60+
- `12752c1 <https://github.com/symfony/symfony-docs/commit/12752c1decd5ec5a3bce960c094f45738122152f>`_ #4013 Removed wrong reference to cookbook (gquemener)
61+
- `ec832dc <https://github.com/symfony/symfony-docs/commit/ec832dc4eadbe5afdfb5f39994b69748b733a85b>`_ #3994 [Console] Fix Console component $app to $this and use of getHelper() method (eko)
6062
- `d8b037a <https://github.com/symfony/symfony-docs/commit/d8b037a989c1581ae671e81284d0d758254d8e1e>`_ #4019 Update twig_reference.rst (redstar504)
6163
- `7ea87e6 <https://github.com/symfony/symfony-docs/commit/7ea87e63e3417c59e47972b9cf12ca76cce4b195>`_ #4016 Fixed the format of one letter-based list (javiereguiluz)
6264
- `579a873 <https://github.com/symfony/symfony-docs/commit/579a8732299dd944998ab3fee4fa738a3c45cea2>`_ #4015 Fixed bad indenting (the list was treated as a blockquote) (javiereguiluz)
63-
- `12752c1 <https://github.com/symfony/symfony-docs/commit/12752c1decd5ec5a3bce960c094f45738122152f>`_ #4013 Removed wrong reference to cookbook (gquemener)
6465
- `4669620 <https://github.com/symfony/symfony-docs/commit/466962051e0753557fc75d9d449083d68ae48992>`_ #4004 use GitHub instead of Github (xabbuh)
65-
- `ec832dc <https://github.com/symfony/symfony-docs/commit/ec832dc4eadbe5afdfb5f39994b69748b733a85b>`_ #3994 [Console] Fix Console component $app to $this and use of getHelper() method (eko)
6666
- `a3fe74f <https://github.com/symfony/symfony-docs/commit/a3fe74f4fad9f691dc570fb9234acd15bd6ccfdc>`_ #3993 [Console] Fix Console component getHelperSet()->get() to getHelper() (eko)
6767
- `a41af7e <https://github.com/symfony/symfony-docs/commit/a41af7e0f4a10cf7a6230598fd955dab2559935e>`_ #3880 document the mysterious abc part of the header (greg0ire)
6868
- `90773b0 <https://github.com/symfony/symfony-docs/commit/90773b03425388542d1b0face5368eb4c47ce3b8>`_ #3990 Move the section about collect: false to the cookbook entry (weaverryan)

contributing/code/bugs.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ If your problem definitely looks like a bug, report it using the official bug
2525
* Describe the steps needed to reproduce the bug with short code examples
2626
(providing a unit test that illustrates the bug is best);
2727

28+
* If the bug you experienced affects more than one layer, providing a simple
29+
failing unit test may not be sufficient. In this case, please fork the
30+
`Symfony Standard Edition`_ and reproduce your issue on a new branch;
31+
2832
* Give as much detail as possible about your environment (OS, PHP version,
2933
Symfony version, enabled extensions, ...);
3034

@@ -35,3 +39,4 @@ If your problem definitely looks like a bug, report it using the official bug
3539
.. _forum: http://forum.symfony-project.org/
3640
.. _IRC channel: irc://irc.freenode.net/symfony
3741
.. _tracker: https://github.com/symfony/symfony/issues
42+
.. _Symfony Standard Edition: https://github.com/symfony/symfony-standard/

contributing/community/releases.rst

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -86,29 +86,31 @@ Below is the schedule for the first few versions that use this release model:
8686

8787
This results in very predictable dates and maintenance periods:
8888

89-
+---------+---------+---------------------+-------------+
90-
| Version | Release | End of Maintenance | End of Life |
91-
+=========+=========+=====================+=============+
92-
| 2.0 | 07/2011 | 03/2013 (20 months) | 09/2013 |
93-
+---------+---------+---------------------+-------------+
94-
| 2.1 | 09/2012 | 05/2013 (9 months) | 11/2013 |
95-
+---------+---------+---------------------+-------------+
96-
| 2.2 | 03/2013 | 11/2013 (8 months) | 05/2014 |
97-
+---------+---------+---------------------+-------------+
98-
| **2.3** | 05/2013 | 05/2016 (36 months) | 05/2017 |
99-
+---------+---------+---------------------+-------------+
100-
| 2.4 | 11/2013 | 07/2014 (8 months) | 01/2015 |
101-
+---------+---------+---------------------+-------------+
102-
| 2.5 | 05/2014 | 01/2015 (8 months) | 07/2015 |
103-
+---------+---------+---------------------+-------------+
104-
| 2.6 | 11/2014 | 07/2015 (8 months) | 01/2016 |
105-
+---------+---------+---------------------+-------------+
106-
| **2.7** | 05/2015 | 05/2018 (36 months) | 05/2019 |
107-
+---------+---------+---------------------+-------------+
108-
| 2.8 | 11/2015 | 07/2016 (8 months) | 01/2017 |
109-
+---------+---------+---------------------+-------------+
110-
| ... | ... | ... | ... |
111-
+---------+---------+---------------------+-------------+
89+
+---------+---------+--------------------------+-------------+
90+
| Version | Release | End of Maintenance | End of Life |
91+
+=========+=========+==========================+=============+
92+
| 2.0 | 07/2011 | 03/2013 (20 months) | 09/2013 |
93+
+---------+---------+--------------------------+-------------+
94+
| 2.1 | 09/2012 | 05/2013 (9 months) | 11/2013 |
95+
+---------+---------+--------------------------+-------------+
96+
| 2.2 | 03/2013 | 11/2013 (8 months) | 05/2014 |
97+
+---------+---------+--------------------------+-------------+
98+
| **2.3** | 05/2013 | 05/2016 (36 months) | 05/2017 |
99+
+---------+---------+--------------------------+-------------+
100+
| 2.4 | 11/2013 | 09/2014 (10 months [1]_) | 01/2015 |
101+
+---------+---------+--------------------------+-------------+
102+
| 2.5 | 05/2014 | 01/2015 (8 months) | 07/2015 |
103+
+---------+---------+--------------------------+-------------+
104+
| 2.6 | 11/2014 | 07/2015 (8 months) | 01/2016 |
105+
+---------+---------+--------------------------+-------------+
106+
| **2.7** | 05/2015 | 05/2018 (36 months) | 05/2019 |
107+
+---------+---------+--------------------------+-------------+
108+
| 2.8 | 11/2015 | 07/2016 (8 months) | 01/2017 |
109+
+---------+---------+--------------------------+-------------+
110+
| ... | ... | ... | ... |
111+
+---------+---------+--------------------------+-------------+
112+
113+
.. [1] Symfony 2.4 maintenance has been `extended to September 2014`_.
112114
113115
.. tip::
114116

@@ -179,4 +181,5 @@ version is published every two years and there is a year to upgrade.
179181
.. _Git repository: https://github.com/symfony/symfony
180182
.. _SensioLabs: http://sensiolabs.com/
181183
.. _roadmap notification: http://symfony.com/roadmap
184+
.. _extended to September 2014: http://symfony.com/blog/extended-maintenance-for-symfony-2-4
182185
.. _timeline calculator: http://symfony.com/roadmap

cookbook/console/sending_emails.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@ from the ``router`` service and override its settings::
8585
Using Memory Spooling
8686
---------------------
8787

88+
.. versionadded: 2.3
89+
When using Symfony 2.3+ and SwiftmailerBundle 2.3.5+, the memory spool is now
90+
handled automatically in the CLI and the code below is not necessary anymore.
91+
8892
Sending emails in a console command works the same way as described in the
8993
:doc:`/cookbook/email/email` cookbook except if memory spooling is used.
9094

cookbook/security/api_key_authentication.rst

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ you can use to create an error ``Response``.
232232
233233
class ApiKeyAuthenticator implements SimplePreAuthenticatorInterface, AuthenticationFailureHandlerInterface
234234
{
235-
//...
235+
// ...
236236
237237
public function onAuthenticationFailure(Request $request, AuthenticationException $exception)
238238
{
@@ -427,6 +427,51 @@ configuration or set it to ``false``:
427427
),
428428
));
429429
430+
Even though the token is being stored in the session, the credentials - in this
431+
case the API key (i.e. ``$token->getCredentials()``) - are not stored in the session
432+
for security reasons. To take advantage of the session, update ``ApiKeyAuthenticator``
433+
to see if the stored token has a valid User object that can be used::
434+
435+
// src/Acme/HelloBundle/Security/ApiKeyAuthenticator.php
436+
// ...
437+
438+
class ApiKeyAuthenticator implements SimplePreAuthenticatorInterface
439+
{
440+
// ...
441+
public function authenticateToken(TokenInterface $token, UserProviderInterface $userProvider, $providerKey)
442+
{
443+
$apiKey = $token->getCredentials();
444+
$username = $this->userProvider->getUsernameForApiKey($apiKey);
445+
446+
// User is the Entity which represents your user
447+
$user = $token->getUser();
448+
if ($user instanceof User) {
449+
return new PreAuthenticatedToken(
450+
$user,
451+
$apiKey,
452+
$providerKey,
453+
$user->getRoles()
454+
);
455+
}
456+
457+
if (!$username) {
458+
throw new AuthenticationException(
459+
sprintf('API Key "%s" does not exist.', $apiKey)
460+
);
461+
}
462+
463+
$user = $this->userProvider->loadUserByUsername($username);
464+
465+
return new PreAuthenticatedToken(
466+
$user,
467+
$apiKey,
468+
$providerKey,
469+
$user->getRoles()
470+
);
471+
}
472+
// ...
473+
}
474+
430475
Storing authentication information in the session works like this:
431476

432477
#. At the end of each request, Symfony serializes the token object (returned

images/release-process.jpg

14.9 KB
Loading

reference/forms/types/choice.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,16 @@ Overridden Options
115115
------------------
116116

117117
.. include:: /reference/forms/types/options/empty_data.rst.inc
118+
:end-before: DEFAULT_PLACEHOLDER
119+
120+
The actual default value of this option depends on other field options:
121+
122+
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
123+
(empty string);
124+
* Otherwise ``array()`` (empty array).
125+
126+
.. include:: /reference/forms/types/options/empty_data.rst.inc
127+
:start-after: DEFAULT_PLACEHOLDER
118128

119129
compound
120130
~~~~~~~~

reference/forms/types/collection.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,12 @@ error_bubbling
374374
.. include:: /reference/forms/types/options/by_reference.rst.inc
375375

376376
.. include:: /reference/forms/types/options/empty_data.rst.inc
377+
:end-before: DEFAULT_PLACEHOLDER
378+
379+
The default value is ``array()`` (empty array).
380+
381+
.. include:: /reference/forms/types/options/empty_data.rst.inc
382+
:start-after: DEFAULT_PLACEHOLDER
377383

378384
.. include:: /reference/forms/types/options/required.rst.inc
379385

reference/forms/types/country.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ These options inherit from the :doc:`choice </reference/forms/types/choice>` typ
7676
These options inherit from the :doc:`form </reference/forms/types/form>` type:
7777

7878
.. include:: /reference/forms/types/options/empty_data.rst.inc
79+
:end-before: DEFAULT_PLACEHOLDER
80+
81+
The actual default value of this option depends on other field options:
82+
83+
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
84+
(empty string);
85+
* Otherwise ``array()`` (empty array).
86+
87+
.. include:: /reference/forms/types/options/empty_data.rst.inc
88+
:start-after: DEFAULT_PLACEHOLDER
7989

8090
.. include:: /reference/forms/types/options/required.rst.inc
8191

reference/forms/types/currency.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,16 @@ These options inherit from the :doc:`choice</reference/forms/types/choice>` type
6666
These options inherit from the :doc:`form</reference/forms/types/form>` type:
6767

6868
.. include:: /reference/forms/types/options/empty_data.rst.inc
69+
:end-before: DEFAULT_PLACEHOLDER
70+
71+
The actual default value of this option depends on other field options:
72+
73+
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
74+
(empty string);
75+
* Otherwise ``array()`` (empty array).
76+
77+
.. include:: /reference/forms/types/options/empty_data.rst.inc
78+
:start-after: DEFAULT_PLACEHOLDER
6979

7080
.. include:: /reference/forms/types/options/required.rst.inc
7181

0 commit comments

Comments
 (0)