Bridge/Symfony/DependencyInjection/ConfigureValidatorPass.php
public function process(ContainerBuilder $container)
    {
        if (!$container->has('validator.builder')) {
            throw new ServiceNotFoundException('Validation is not enabled.');
        }

        $validatorBuilder = $container->getDefinition('validator.builder');

        $names = [
            'cart',
            'common',
            'invoice',
            'customer',
            'order',
            'payment',
            'pricing',
            'quote',
            'shipment',
            'stock',
            'subject',
            'supplier',
            'support',
        ];

        $paths = [];
        foreach ($names as $name) {
            $paths[] = realpath(__DIR__ . sprintf('/../Resources/validation/%s.xml', $name));
        }

        $validatorBuilder->addMethodCall('addXmlMappings', [$paths]);
    }
public function process(ContainerBuilder $container)
    {
        if (!$container->has('validator.builder')) {
            throw new ServiceNotFoundException('Validation is not enabled.');
        }

        $validatorBuilder = $container->getDefinition('validator.builder');

        $names = [
            'cart',
            'common',
            'invoice',
            'customer',
            'order',
            'payment',
            'pricing',
            'quote',
            'shipment',
            'stock',
            'subject',
            'supplier',
            'support',
        ];

        $paths = [];
        foreach ($names as $name) {
            $paths[] = realpath(__DIR__ . sprintf('/../Resources/validation/%s.xml', $name));
        }

        $validatorBuilder->addMethodCall('addXmlMappings', [$paths]);
    }
{@inheritdoc}