@@ -279,52 +279,11 @@ previous configuration by the following:
279279 ],
280280 ]);
281281
282- By default, config files are located in the ``config/validator/ `` directory.
283- It is possible to define an array of paths with files or directories where the component will look for additional validation files:
284-
285- .. configuration-block ::
286-
287- .. code-block :: yaml
288-
289- # config/packages/framework.yaml
290- framework :
291- validation :
292- mapping :
293- paths :
294- - " %kernel.project_dir%/validation/"
295-
296- .. code-block :: xml
297-
298- <!-- config/packages/framework.xml -->
299- <?xml version =" 1.0" encoding =" UTF-8" ?>
300- <container xmlns =" http://symfony.com/schema/dic/services"
301- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
302- xmlns : framework =" http://symfony.com/schema/dic/symfony"
303- xsi : schemaLocation =" http://symfony.com/schema/dic/services
304- https://symfony.com/schema/dic/services/services-1.0.xsd
305- http://symfony.com/schema/dic/symfony https://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
306-
307- <framework : config >
308- <framework : validation >
309- <framework : mapping >
310- <framework : path >%kernel.project_dir%/validation</framework : path >
311- </framework : mapping >
312- </framework : validation >
313- </framework : config >
314- </container >
315-
316- .. code-block :: php
282+ .. tip ::
317283
318- // config/packages/framework.php
319- $container->loadFromExtension('framework', [
320- 'validation' => [
321- 'mapping' => [
322- 'paths' => [
323- '%kernel.project_dir%/validation',
324- ],
325- ],
326- ],
327- ]);
284+ When using PHP, YAML, and XML files instead of annotations, Symfony looks
285+ for by default in the ``config/validator/ `` directory, but you can configure
286+ other directories with the :ref: `validation.mapping.paths <reference-validation-mapping >` option.
328287
329288.. index ::
330289 single: Validation; Constraints
0 commit comments