Right now, I have a file called validation.yml with the validation of all the bundle\'s entities in one file.
validation.yml
Blogger\\BlogBundle\\Ent
Another alternative:
public function load(array $configs, ContainerBuilder $container)
{
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
$validatorFiles = $container->getParameter('validator.mapping.loader.yaml_files_loader.mapping_files');
$finder = new Finder();
foreach ($finder->files()->in(__DIR__ . '/../Resources/config/validation') as $file) {
$validatorFiles[] = $file->getRealPath();
}
$container->setParameter('validator.mapping.loader.yaml_files_loader.mapping_files', $validatorFiles);
}
This way, using the Finder Component, you don't have to be concerned about touching this file each time you add a new validator file.