Skip to content

Commit 63b585e

Browse files
committed
Merge branch '2.8' into 3.2
* 2.8: setfacl commands in the right order [#7941] use class constant Update guard_authentication.rst Fix typo added missing ClassMetadata
2 parents 351f128 + 85b0c79 commit 63b585e

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

form/unit_testing.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,9 @@ 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\Validator\ConstraintViolationList;
179+
use Symfony\Component\Validator\Mapping\ClassMetadata;
178180
use Symfony\Component\Validator\Validator\ValidatorInterface;
179181

180182
class TestedTypeTest extends TypeTestCase
@@ -189,6 +191,9 @@ allows you to return a list of extensions to register::
189191
$this->validator
190192
->method('validate')
191193
->will($this->returnValue(new ConstraintViolationList()));
194+
$validator
195+
->method('getMetadataFor')
196+
->will($this->returnValue(new ClassMetadata(Form::class)));
192197

193198
return array(
194199
new ValidatorExtension($this->validator),

security/guard_authentication.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ user (if any).
148148
To create a custom authentication system, just create a class and make it implement
149149
:class:`Symfony\\Component\\Security\\Guard\\GuardAuthenticatorInterface`. Or, extend
150150
the simpler :class:`Symfony\\Component\\Security\\Guard\\AbstractGuardAuthenticator`.
151-
This requires you to implement six methods::
151+
This requires you to implement seven methods::
152152

153153
// src/AppBundle/Security/TokenAuthenticator.php
154154
namespace AppBundle\Security;

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 var
5453
$ sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX var
54+
$ sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:$(whoami):rwX var
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)