Skip to content

Commit 266d60c

Browse files
committed
Merge remote-tracking branch 'upstream/2.7' into 2.7
2 parents 5e5d567 + cc65be3 commit 266d60c

File tree

6 files changed

+18
-11
lines changed

6 files changed

+18
-11
lines changed

form/unit_testing.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,12 @@ allows you to return a list of extensions to register::
174174

175175
use AppBundle\Form\Type\TestedType;
176176
use Symfony\Component\Form\Extension\Validator\ValidatorExtension;
177+
use Symfony\Component\Form\Form;
177178
use Symfony\Component\Form\Forms;
178179
use Symfony\Component\Form\FormBuilder;
179180
use Symfony\Component\Form\Test\TypeTestCase;
180181
use Symfony\Component\Validator\ConstraintViolationList;
182+
use Symfony\Component\Validator\Mapping\ClassMetadata;
181183
use Symfony\Component\Validator\Validator\ValidatorInterface;
182184

183185
class TestedTypeTest extends TypeTestCase
@@ -190,6 +192,9 @@ allows you to return a list of extensions to register::
190192
$validator
191193
->method('validate')
192194
->will($this->returnValue(new ConstraintViolationList()));
195+
$validator
196+
->method('getMetadataFor')
197+
->will($this->returnValue(new ClassMetadata(Form::class)));
193198

194199
return array(
195200
new ValidatorExtension($validator),

reference/constraints/LessThan.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Basic Usage
2626

2727
The following constraints ensure that:
2828

29-
* the number of ``siblings`` of a ``Person`` is less than or equal to ``5``
30-
* ``age`` is less than``80``
29+
* the number of ``siblings`` of a ``Person`` is less than ``5``
30+
* ``age`` is less than ``80``
3131

3232
.. configuration-block::
3333

reference/twig_reference.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,12 @@ set for the package and the URL path. More information in
130130
:ref:`templating-assets`. For asset versioning, see
131131
:ref:`reference-framework-assets-version`.
132132

133-
assets_version
133+
asset_version
134134
~~~~~~~~~~~~~~
135135

136136
.. code-block:: twig
137137
138-
{{ assets_version(packageName = null) }}
138+
{{ asset_version(packageName = null) }}
139139
140140
``packageName`` *(optional)*
141141
**type**: ``string`` | ``null`` **default**: ``null``

service_container/alias_private.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ However, if a service has been marked as private, you can still alias it
7272
.. note::
7373

7474
Services are by default public, but it's considered a good practice to mark
75-
as much services private as possible.
75+
as many services private as possible.
7676

7777
Aliasing
7878
--------

setup/file_permissions.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ following script to determine your web server user and grant the needed permissi
5050
5151
$ HTTPDUSER=$(ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1)
5252
# if this doesn't work, try adding `-n` option
53-
$ sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX app/cache app/logs
5453
$ sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX app/cache app/logs
54+
$ sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX app/cache app/logs
5555
5656
.. note::
5757

validation/translations.rst

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,13 @@ property is not empty, add the following:
8484
}
8585
}
8686
87-
Create a translation file under the ``validators`` catalog for the constraint
88-
messages, typically in the ``Resources/translations/`` directory of the bundle.
87+
Now, create a ``validators`` catalog file in the ``app/Resources/translations`` directory:
8988

9089
.. configuration-block::
9190

9291
.. code-block:: xml
9392
94-
<!-- validators.en.xlf -->
93+
<!-- app/Resources/translations/validators.en.xlf -->
9594
<?xml version="1.0"?>
9695
<xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2">
9796
<file source-language="en" datatype="plaintext" original="file.ext">
@@ -106,12 +105,15 @@ messages, typically in the ``Resources/translations/`` directory of the bundle.
106105
107106
.. code-block:: yaml
108107
109-
# validators.en.yml
108+
# app/Resources/translations/validators.en.yml
110109
author.name.not_blank: Please enter an author name.
111110
112111
.. code-block:: php
113112
114-
// validators.en.php
113+
// app/Resources/translations/validators.en.php
115114
return array(
116115
'author.name.not_blank' => 'Please enter an author name.',
117116
);
117+
118+
You may need to clear your cache (even in the dev environment) after creating this
119+
file for the first time.

0 commit comments

Comments
 (0)