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

Appearance settings

Commit 85b0c79

Browse filesBrowse files
committed
Merge branch '2.7' into 2.8
* 2.7: setfacl commands in the right order [#7941] use class constant Fix typo added missing ClassMetadata
2 parents 4d970ac + ef94012 commit 85b0c79
Copy full SHA for 85b0c79

File tree

Expand file treeCollapse file tree

3 files changed

+13
-6
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+13
-6
lines changed

‎form/unit_testing.rst

Copy file name to clipboardExpand all lines: form/unit_testing.rst
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,9 @@ allows you to return a list of extensions to register::
179179
// ...
180180
use AppBundle\Form\Type\TestedType;
181181
use Symfony\Component\Form\Extension\Validator\ValidatorExtension;
182+
use Symfony\Component\Form\Form;
182183
use Symfony\Component\Validator\ConstraintViolationList;
184+
use Symfony\Component\Validator\Mapping\ClassMetadata;
183185
use Symfony\Component\Validator\Validator\ValidatorInterface;
184186

185187
class TestedTypeTest extends TypeTestCase
@@ -194,6 +196,9 @@ allows you to return a list of extensions to register::
194196
$this->validator
195197
->method('validate')
196198
->will($this->returnValue(new ConstraintViolationList()));
199+
$validator
200+
->method('getMetadataFor')
201+
->will($this->returnValue(new ClassMetadata(Form::class)));
197202

198203
return array(
199204
new ValidatorExtension($this->validator),

‎setup/file_permissions.rst

Copy file name to clipboardExpand all lines: setup/file_permissions.rst
+1-1Lines 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

Copy file name to clipboardExpand all lines: validation/translations.rst
+7-5Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.