Skip to content

Commit 18173a5

Browse files
committed
Merge branch '2.0' into 2.1
Conflicts: reference/forms/types/birthday.rst reference/forms/types/date.rst reference/forms/types/datetime.rst reference/forms/types/time.rst
2 parents b23d264 + 866af09 commit 18173a5

File tree

15 files changed

+58
-34
lines changed

15 files changed

+58
-34
lines changed

book/propel.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ you:
6868

6969
In this example, you have one configured connection, named ``default``. If
7070
you want to configure more than one connection, read the `PropelBundle
71-
configuration section <Working With Symfony2 - Configuration>`_.
71+
configuration section`_.
7272

7373
Creating a Model Class
7474
~~~~~~~~~~~~~~~~~~~~~~
@@ -434,7 +434,7 @@ Commands
434434
You should read the dedicated section for `Propel commands in Symfony2`_.
435435

436436
.. _`Working With Symfony2`: http://propelorm.org/cookbook/symfony2/working-with-symfony2.html#installation
437-
.. _`Working With Symfony2 - Configuration`: http://propelorm.org/cookbook/symfony2/working-with-symfony2.html#configuration
437+
.. _`PropelBundle configuration section`: http://propelorm.org/cookbook/symfony2/working-with-symfony2.html#configuration
438438
.. _`Relationships`: http://propelorm.org/documentation/04-relationships.html
439439
.. _`Behaviors reference section`: http://propelorm.org/documentation/#behaviors_reference
440440
.. _`Propel commands in Symfony2`: http://propelorm.org/cookbook/symfony2/working-with-symfony2#the_commands

book/testing.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,16 @@ or perform more complex requests::
345345
// Directly submit a form (but using the Crawler is easier!)
346346
$client->request('POST', '/submit', array('name' => 'Fabien'));
347347

348+
// Submit a raw JSON string in the requst body
349+
$client->request(
350+
'POST',
351+
'/submit',
352+
array(),
353+
array(),
354+
array('CONTENT_TYPE' => 'application/json'),
355+
'{"name":"Fabien"}'
356+
);
357+
348358
// Form submission with a file upload
349359
use Symfony\Component\HttpFoundation\File\UploadedFile;
350360

components/dependency_injection/compilation.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,10 @@ something needed in everyday use.
287287
The compiler pass must have the ``process`` method which is passed the container
288288
being compiled::
289289

290-
class CustomCompilerPass
290+
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
291+
use Symfony\Component\DependencyInjection\ContainerBuilder;
292+
293+
class CustomCompilerPass implements CompilerPassInterface
291294
{
292295
public function process(ContainerBuilder $container)
293296
{

components/map.rst.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
* :doc:`/components/dependency_injection/introduction`
2828
* :doc:`/components/dependency_injection/types`
29-
* :doc:`/components/dependency_injection/parameter`
29+
* :doc:`/components/dependency_injection/parameters`
3030
* :doc:`/components/dependency_injection/definitions`
3131
* :doc:`/components/dependency_injection/compilation`
3232
* :doc:`/components/dependency_injection/tags`

cookbook/doctrine/file_uploads.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.. index::
22
single: Doctrine; File uploads
33

4-
54
How to handle File Uploads with Doctrine
65
========================================
76

@@ -120,7 +119,7 @@ look like this::
120119
Next, create this property on your ``Document`` class and add some validation
121120
rules::
122121

123-
use Symfony\Component\HttpFoundation\File\UploadedFile;
122+
use Symfony\Component\HttpFoundation\File\UploadedFile;
124123

125124
// ...
126125
class Document

cookbook/validation/custom_constraint.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ not to the property:
236236
# src/Acme/BlogBundle/Resources/config/validation.yml
237237
Acme\DemoBundle\Entity\AcmeEntity:
238238
constraints:
239-
ContainsAlphanumeric: ~
239+
Acme\DemoBundle\Validator\Constraints\ContainsAlphanumeric: ~
240240
241241
.. code-block:: php-annotations
242242
@@ -252,5 +252,5 @@ not to the property:
252252
253253
<!-- src/Acme/BlogBundle/Resources/config/validation.xml -->
254254
<class name="Acme\DemoBundle\Entity\AcmeEntity">
255-
<constraint name="ContainsAlphanumeric" />
255+
<constraint name="Acme\DemoBundle\Validator\Constraints\ContainsAlphanumeric" />
256256
</class>

reference/constraints/Valid.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ Options
244244
traverse
245245
~~~~~~~~
246246

247-
**type**: ``string`` **default**: ``true``
247+
**type**: ``boolean`` **default**: ``true``
248248

249249
If this constraint is applied to a property that holds an array of objects,
250250
then each object in that array will be validated only if this option is set

reference/forms/types/birthday.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ option defaults to 120 years ago to the current year.
2626
| | - `months`_ |
2727
| | - `days`_ |
2828
| | - `format`_ |
29-
| | - `pattern`_ |
3029
| | - `data_timezone`_ |
3130
| | - `user_timezone`_ |
3231
| | - `invalid_message`_ |
3332
| | - `invalid_message_parameters`_ |
3433
| | - `read_only`_ |
3534
| | - `disabled`_ |
35+
| | - `virtual`_ |
3636
+----------------------+------------------------------------------------------------------------------------------------------------------------+
3737
| Parent type | :doc:`date</reference/forms/types/date>` |
3838
+----------------------+------------------------------------------------------------------------------------------------------------------------+
@@ -64,8 +64,6 @@ These options inherit from the :doc:`date</reference/forms/types/date>` type:
6464
.. include:: /reference/forms/types/options/days.rst.inc
6565

6666
.. include:: /reference/forms/types/options/date_format.rst.inc
67-
68-
.. include:: /reference/forms/types/options/date_pattern.rst.inc
6967

7068
.. include:: /reference/forms/types/options/data_timezone.rst.inc
7169

@@ -79,4 +77,8 @@ These options inherit from the :doc:`date</reference/forms/types/field>` type:
7977

8078
.. include:: /reference/forms/types/options/read_only.rst.inc
8179

82-
.. include:: /reference/forms/types/options/disabled.rst.inc
80+
.. include:: /reference/forms/types/options/disabled.rst.inc
81+
82+
These options inherit from the :doc:`date</reference/forms/types/form>` type:
83+
84+
.. include:: /reference/forms/types/options/virtual.rst.inc

reference/forms/types/choice.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ option.
2727
| | - `read_only`_ |
2828
| | - `disabled`_ |
2929
| | - `error_bubbling`_ |
30+
| | - `virtual`_ |
3031
+-------------+-----------------------------------------------------------------------------+
3132
| Parent type | :doc:`form</reference/forms/types/form>` (if expanded), ``field`` otherwise |
3233
+-------------+-----------------------------------------------------------------------------+
@@ -122,3 +123,7 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:
122123
.. include:: /reference/forms/types/options/disabled.rst.inc
123124

124125
.. include:: /reference/forms/types/options/error_bubbling.rst.inc
126+
127+
These options inherit from the :doc:`date</reference/forms/types/form>` type:
128+
129+
.. include:: /reference/forms/types/options/virtual.rst.inc

reference/forms/types/date.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@ day, and year) or three select boxes (see the `widget_` option).
2626
| | - `months`_ |
2727
| | - `days`_ |
2828
| | - `format`_ |
29-
| | - `pattern`_ |
3029
| | - `data_timezone`_ |
3130
| | - `user_timezone`_ |
3231
+----------------------+-----------------------------------------------------------------------------+
3332
| Inherited | - `invalid_message`_ |
3433
| options | - `invalid_message_parameters`_ |
3534
| | - `read_only`_ |
3635
| | - `disabled`_ |
36+
| | - `virtual`_ |
3737
+----------------------+-----------------------------------------------------------------------------+
3838
| Parent type | ``field`` (if text), ``form`` otherwise |
3939
+----------------------+-----------------------------------------------------------------------------+
@@ -109,8 +109,6 @@ Alternatively, you can specify a string to be displayed for the "blank" value::
109109

110110
.. include:: /reference/forms/types/options/date_format.rst.inc
111111

112-
.. include:: /reference/forms/types/options/date_pattern.rst.inc
113-
114112
.. include:: /reference/forms/types/options/data_timezone.rst.inc
115113

116114
.. include:: /reference/forms/types/options/user_timezone.rst.inc
@@ -126,4 +124,8 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:
126124

127125
.. include:: /reference/forms/types/options/read_only.rst.inc
128126

129-
.. include:: /reference/forms/types/options/disabled.rst.inc
127+
.. include:: /reference/forms/types/options/disabled.rst.inc
128+
129+
These options inherit from the :doc:`date</reference/forms/types/form>` type:
130+
131+
.. include:: /reference/forms/types/options/virtual.rst.inc

reference/forms/types/datetime.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ data can be a ``DateTime`` object, a string, a timestamp or an array.
3333
| options | - `invalid_message_parameters`_ |
3434
| | - `read_only`_ |
3535
| | - `disabled`_ |
36+
| | - `virtual`_ |
3637
+----------------------+-----------------------------------------------------------------------------+
3738
| Parent type | :doc:`form</reference/forms/types/form>` |
3839
+----------------------+-----------------------------------------------------------------------------+
@@ -110,4 +111,8 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:
110111

111112
.. include:: /reference/forms/types/options/read_only.rst.inc
112113

113-
.. include:: /reference/forms/types/options/disabled.rst.inc
114+
.. include:: /reference/forms/types/options/disabled.rst.inc
115+
116+
These options inherit from the :doc:`date</reference/forms/types/form>` type:
117+
118+
.. include:: /reference/forms/types/options/virtual.rst.inc

reference/forms/types/options/date_pattern.rst.inc

Lines changed: 0 additions & 14 deletions
This file was deleted.

reference/forms/types/options/date_widget.rst.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ widget
66
The basic way in which this field should be rendered. Can be one of the following:
77

88
* ``choice``: renders three select inputs. The order of the selects is defined
9-
in the `pattern`_ option.
9+
in the `format`_ option.
1010

1111
* ``text``: renders a three field input of type text (month, day, year).
1212

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
virtual
2+
~~~~~~~
3+
4+
**type**: ``boolean`` **default**: ``false``
5+
6+
This option determines if the form will be mapped with data. This can be useful
7+
if you need a form to structure the view. See :doc:`/cookbook/form/use_virtuals_forms`.

reference/forms/types/time.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ as a ``DateTime`` object, a string, a timestamp or an array.
2828
| options | - `invalid_message_parameters`_ |
2929
| | - `read_only`_ |
3030
| | - `disabled`_ |
31+
| | - `virtual`_ |
3132
+----------------------+-----------------------------------------------------------------------------+
3233
| Parent type | form |
3334
+----------------------+-----------------------------------------------------------------------------+
@@ -121,4 +122,8 @@ These options inherit from the :doc:`field</reference/forms/types/field>` type:
121122

122123
.. include:: /reference/forms/types/options/read_only.rst.inc
123124

124-
.. include:: /reference/forms/types/options/disabled.rst.inc
125+
.. include:: /reference/forms/types/options/disabled.rst.inc
126+
127+
These options inherit from the :doc:`date</reference/forms/types/form>` type:
128+
129+
.. include:: /reference/forms/types/options/virtual.rst.inc

0 commit comments

Comments
 (0)