Skip to content

Commit

Permalink
Merge branch '2.7' into 2.8
Browse files Browse the repository at this point in the history
Conflicts:
	best_practices/forms.rst
  • Loading branch information
xabbuh committed Dec 31, 2015
2 parents 3a7624f + 86901d8 commit ddd3478
Show file tree
Hide file tree
Showing 15 changed files with 478 additions and 50 deletions.
8 changes: 7 additions & 1 deletion best_practices/forms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,17 @@ form in its own PHP class::
}
}

.. best-practice::

Put the form type classes in the ``AppBundle\Form`` namespace, unless you
use other custom form classes like data transformers.

To use the class, use ``createForm`` and pass the fully qualified class name::

use AppBundle\Form\PostType;
// ...
use AppBundle\Form\PostType;

// ...
public function newAction(Request $request)
{
$post = new Post();
Expand Down
8 changes: 4 additions & 4 deletions book/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ this method must return ``true``:
AppBundle\Entity\Author:
getters:
passwordLegal:
- 'True': { message: 'The password cannot match your first name' }
- 'IsTrue': { message: 'The password cannot match your first name' }
.. code-block:: xml
Expand All @@ -656,7 +656,7 @@ this method must return ``true``:
<class name="AppBundle\Entity\Author">
<getter property="passwordLegal">
<constraint name="True">
<constraint name="IsTrue">
<option name="message">The password cannot match your first name</option>
</constraint>
</getter>
Expand Down Expand Up @@ -954,7 +954,7 @@ username and the password are different only if all other validation passes
- Strict
getters:
passwordLegal:
- 'True':
- 'IsTrue':
message: 'The password cannot match your username'
groups: [Strict]
properties:
Expand All @@ -981,7 +981,7 @@ username and the password are different only if all other validation passes
</property>
<getter property="passwordLegal">
<constraint name="True">
<constraint name="IsTrue">
<option name="message">The password cannot match your username</option>
<option name="groups">
<value>Strict</value>
Expand Down
7 changes: 0 additions & 7 deletions contributing/code/_api_tagging.rst.inc

This file was deleted.

4 changes: 0 additions & 4 deletions contributing/code/bc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ backwards compatibility promise:
| Add a default value to an argument | Yes |
+-----------------------------------------------+-----------------------------+

.. include:: _api_tagging.rst.inc

Using our Classes
~~~~~~~~~~~~~~~~~

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

.. include:: _api_tagging.rst.inc

Working on Symfony Code
-----------------------

Expand Down
18 changes: 17 additions & 1 deletion contributing/code/standards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@ example containing most features described below:
$this->fooBar = $this->transformText($dummy);
}
/**
* @return string
*
* @deprecated
*/
public function someDeprecatedMethod()
{
@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);
return Baz::someMethod();
}

/**
* Transforms the input given as first argument.
*
Expand Down Expand Up @@ -151,7 +163,11 @@ Structure
* Use parentheses when instantiating classes regardless of the number of
arguments the constructor has;

* Exception message strings should be concatenated using :phpfunction:`sprintf`.
* Exception and error message strings should be concatenated using :phpfunction:`sprintf`.

* Calls to :phpfunction:`trigger_error` with type ``E_USER_DEPRECATED`` should be
switched to opt-in via ``@`` operator.
Read more at :ref:`contributing-code-conventions-deprecations`;

Naming Conventions
------------------
Expand Down
1 change: 1 addition & 0 deletions cookbook/console/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Console

console_command
usage
style
command_in_controller
sending_emails
logging
Expand Down
Loading

0 comments on commit ddd3478

Please sign in to comment.