Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf40bb24

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 reportsConflicts:changelog.rst
2 parentsb2a70d1 +68e022a commitf40bb24

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

‎reference/forms/types/email.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ These options inherit from the :doc:`form </reference/forms/types/form>` type:
3636
..include::/reference/forms/types/options/max_length.rst.inc
3737

3838
..include::/reference/forms/types/options/empty_data.rst.inc
39+
:end-before: DEFAULT_PLACEHOLDER
40+
41+
The default value is ``''`` (the empty string).
42+
43+
..include::/reference/forms/types/options/empty_data.rst.inc
44+
:start-after: DEFAULT_PLACEHOLDER
3945

4046
..include::/reference/forms/types/options/required.rst.inc
4147

‎reference/forms/types/entity.rst

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

214214
..include::/reference/forms/types/options/empty_data.rst.inc
215+
:end-before: DEFAULT_PLACEHOLDER
216+
217+
The actual default value of this option depends on other field options:
218+
219+
* If ``multiple`` is ``false`` and ``expanded`` is ``false``, then ``''``
220+
(empty string);
221+
* Otherwise ``array()`` (empty array).
222+
223+
..include::/reference/forms/types/options/empty_data.rst.inc
224+
:start-after: DEFAULT_PLACEHOLDER
215225

216226
..include::/reference/forms/types/options/required.rst.inc
217227

‎reference/forms/types/file.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,12 @@ Inherited Options
9999
These options inherit from the:doc:`form</reference/forms/types/form>` type:
100100

101101
..include::/reference/forms/types/options/empty_data.rst.inc
102+
:end-before: DEFAULT_PLACEHOLDER
103+
104+
The default value is ``null``.
105+
106+
..include::/reference/forms/types/options/empty_data.rst.inc
107+
:start-after: DEFAULT_PLACEHOLDER
102108

103109
..include::/reference/forms/types/options/required.rst.inc
104110

‎reference/forms/types/form.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,18 @@ Field Options
5353
..include::/reference/forms/types/options/data_class.rst.inc
5454

5555
..include::/reference/forms/types/options/empty_data.rst.inc
56+
:end-before: DEFAULT_PLACEHOLDER
57+
58+
The actual default value of this option depends on other field options:
59+
60+
* If ``data_class`` is set and ``required`` is ``true``, then ``new $data_class()``;
61+
* If ``data_class`` is set and ``required`` is ``false``, then ``null``;
62+
* If ``data_class`` is not set and ``compound`` is ``true``, then ``array()``
63+
(empty array);
64+
* If ``data_class`` is not set and ``compound`` is ``false``, then ``''`` (empty string).
65+
66+
..include::/reference/forms/types/options/empty_data.rst.inc
67+
:start-after: DEFAULT_PLACEHOLDER
5668

5769
..include::/reference/forms/types/options/compound.rst.inc
5870

‎reference/forms/types/integer.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ Inherited Options
7979
These options inherit from the:doc:`form</reference/forms/types/form>` type:
8080

8181
..include::/reference/forms/types/options/empty_data.rst.inc
82+
:end-before: DEFAULT_PLACEHOLDER
83+
84+
The default value is ``''`` (the empty string).
85+
86+
..include::/reference/forms/types/options/empty_data.rst.inc
87+
:start-after: DEFAULT_PLACEHOLDER
8288

8389
..include::/reference/forms/types/options/required.rst.inc
8490

‎reference/forms/types/language.rst

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

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

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

‎reference/forms/types/locale.rst

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

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

8393
..include::/reference/forms/types/options/required.rst.inc
8494

‎reference/forms/types/money.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Specifies the currency that the money is being specified in. This determines
4949
the currency symbol that should be shown by the text box. Depending on
5050
the currency - the currency symbol may be shown before or after the input
5151
text field.
52-
52+
5353
This can be any `3 letter ISO 4217 code`_. You can also set this to false to
5454
hide the currency symbol.
5555

@@ -89,6 +89,12 @@ Inherited Options
8989
These options inherit from the:doc:`form</reference/forms/types/form>` type:
9090

9191
..include::/reference/forms/types/options/empty_data.rst.inc
92+
:end-before: DEFAULT_PLACEHOLDER
93+
94+
The default value is ``''`` (the empty string).
95+
96+
..include::/reference/forms/types/options/empty_data.rst.inc
97+
:start-after: DEFAULT_PLACEHOLDER
9298

9399
..include::/reference/forms/types/options/required.rst.inc
94100

@@ -116,7 +122,7 @@ Form Variables
116122
--------------
117123

118124
============= ========== ===============================================================
119-
Variable Type Usage
125+
Variable Type Usage
120126
============= ========== ===============================================================
121127
money_pattern ``string`` The format to use to display the money, including the currency.
122128
============= ========== ===============================================================

‎reference/forms/types/number.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,16 @@ rounding_mode
4545

4646
If a submitted number needs to be rounded (based on the ``precision``
4747
option), you have several configurable options for that rounding. Each
48+
<<<<<<< HEAD
4849
option is a constant on the:class:`Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\NumberToLocalizedStringTransformer`:
4950

5051
* ``NumberToLocalizedStringTransformer::ROUND_DOWN`` Round towards zero.
52+
=======
53+
option is a constant on the:class:`Symfony\\Component\\Form\\Extension\\Core\\DataTransformer\\IntegerToLocalizedStringTransformer`:
54+
55+
* ``IntegerToLocalizedStringTransformer::ROUND_DOWN`` Rounding mode to
56+
round towards zero.
57+
>>>>>>> 2.3
5158

5259
* ``NumberToLocalizedStringTransformer::ROUND_FLOOR`` Round towards negative
5360
infinity.
@@ -75,6 +82,12 @@ Inherited Options
7582
These options inherit from the:doc:`form</reference/forms/types/form>` type:
7683

7784
..include::/reference/forms/types/options/empty_data.rst.inc
85+
:end-before: DEFAULT_PLACEHOLDER
86+
87+
The default value is ``''`` (the empty string).
88+
89+
..include::/reference/forms/types/options/empty_data.rst.inc
90+
:start-after: DEFAULT_PLACEHOLDER
7891

7992
..include::/reference/forms/types/options/required.rst.inc
8093

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp