Skip to content

Commit 737b62a

Browse files
committed
Document the validator's switch to PSR-6.
1 parent 6aaf30e commit 737b62a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/validator/resources.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,15 +147,15 @@ can slow down your application because each file needs to be parsed, validated
147147
and converted into a :class:`Symfony\\Component\\Validator\\Mapping\\ClassMetadata`
148148
instance.
149149

150-
To solve this problem, call the :method:`Symfony\\Component\\Validator\\ValidatorBuilder::setMetadataCache`
150+
To solve this problem, call the :method:`Symfony\\Component\\Validator\\ValidatorBuilder::setMappingCache`
151151
method of the Validator builder and pass your own caching class (which must
152-
implement :class:`Symfony\\Component\\Validator\\Mapping\\Cache\\CacheInterface`)::
152+
implement the PSR-6 interface :class:`Psr\\Cache\\CacheItemPoolInterface`)::
153153

154154
use Symfony\Component\Validator\Validation;
155155

156156
$validator = Validation::createValidatorBuilder()
157157
// ... add loaders
158-
->setMetadataCache(new SomeImplementCacheInterface());
158+
->setMappingCache(new SomePsr6Cache());
159159
->getValidator();
160160

161161
.. note::

0 commit comments

Comments
 (0)