Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ddd3478

Browse files
committed
Merge branch '2.7' into 2.8
Conflicts: best_practices/forms.rst
2 parents 3a7624f + 86901d8 commit ddd3478

File tree

15 files changed

+478
-50
lines changed

15 files changed

+478
-50
lines changed

best_practices/forms.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,17 @@ form in its own PHP class::
4747
}
4848
}
4949

50+
.. best-practice::
51+
52+
Put the form type classes in the ``AppBundle\Form`` namespace, unless you
53+
use other custom form classes like data transformers.
54+
5055
To use the class, use ``createForm`` and pass the fully qualified class name::
5156

52-
use AppBundle\Form\PostType;
5357
// ...
58+
use AppBundle\Form\PostType;
5459

60+
// ...
5561
public function newAction(Request $request)
5662
{
5763
$post = new Post();

book/validation.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ this method must return ``true``:
644644
AppBundle\Entity\Author:
645645
getters:
646646
passwordLegal:
647-
- 'True': { message: 'The password cannot match your first name' }
647+
- 'IsTrue': { message: 'The password cannot match your first name' }
648648
649649
.. code-block:: xml
650650
@@ -656,7 +656,7 @@ this method must return ``true``:
656656
657657
<class name="AppBundle\Entity\Author">
658658
<getter property="passwordLegal">
659-
<constraint name="True">
659+
<constraint name="IsTrue">
660660
<option name="message">The password cannot match your first name</option>
661661
</constraint>
662662
</getter>
@@ -954,7 +954,7 @@ username and the password are different only if all other validation passes
954954
- Strict
955955
getters:
956956
passwordLegal:
957-
- 'True':
957+
- 'IsTrue':
958958
message: 'The password cannot match your username'
959959
groups: [Strict]
960960
properties:
@@ -981,7 +981,7 @@ username and the password are different only if all other validation passes
981981
</property>
982982
983983
<getter property="passwordLegal">
984-
<constraint name="True">
984+
<constraint name="IsTrue">
985985
<option name="message">The password cannot match your username</option>
986986
<option name="groups">
987987
<value>Strict</value>

contributing/code/_api_tagging.rst.inc

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

contributing/code/bc.rst

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ backwards compatibility promise:
7474
| Add a default value to an argument | Yes |
7575
+-----------------------------------------------+-----------------------------+
7676

77-
.. include:: _api_tagging.rst.inc
78-
7977
Using our Classes
8078
~~~~~~~~~~~~~~~~~
8179

@@ -134,8 +132,6 @@ covered by our backwards compatibility promise:
134132
| Access a private property (via Reflection) | No |
135133
+-----------------------------------------------+-----------------------------+
136134

137-
.. include:: _api_tagging.rst.inc
138-
139135
Working on Symfony Code
140136
-----------------------
141137

contributing/code/standards.rst

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@ example containing most features described below:
5050
$this->fooBar = $this->transformText($dummy);
5151
}
5252
53+
/**
54+
* @return string
55+
*
56+
* @deprecated
57+
*/
58+
public function someDeprecatedMethod()
59+
{
60+
@trigger_error(sprintf('The %s() method is deprecated since version 2.8 and will be removed in 3.0. Use Acme\Baz::someMethod() instead.', __METHOD__), E_USER_DEPRECATED);
61+
62+
return Baz::someMethod();
63+
}
64+
5365
/**
5466
* Transforms the input given as first argument.
5567
*
@@ -151,7 +163,11 @@ Structure
151163
* Use parentheses when instantiating classes regardless of the number of
152164
arguments the constructor has;
153165

154-
* Exception message strings should be concatenated using :phpfunction:`sprintf`.
166+
* Exception and error message strings should be concatenated using :phpfunction:`sprintf`.
167+
168+
* Calls to :phpfunction:`trigger_error` with type ``E_USER_DEPRECATED`` should be
169+
switched to opt-in via ``@`` operator.
170+
Read more at :ref:`contributing-code-conventions-deprecations`;
155171

156172
Naming Conventions
157173
------------------

cookbook/console/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Console
66

77
console_command
88
usage
9+
style
910
command_in_controller
1011
sending_emails
1112
logging

0 commit comments

Comments
 (0)