comparison vendor/symfony/validator/DependencyInjection/AddConstraintValidatorsPass.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 1fec387a4317
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
9 * file that was distributed with this source code. 9 * file that was distributed with this source code.
10 */ 10 */
11 11
12 namespace Symfony\Component\Validator\DependencyInjection; 12 namespace Symfony\Component\Validator\DependencyInjection;
13 13
14 use Symfony\Component\DependencyInjection\ContainerBuilder;
15 use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; 14 use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
16 use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass; 15 use Symfony\Component\DependencyInjection\Compiler\ServiceLocatorTagPass;
16 use Symfony\Component\DependencyInjection\ContainerBuilder;
17 use Symfony\Component\DependencyInjection\Reference; 17 use Symfony\Component\DependencyInjection\Reference;
18 18
19 /** 19 /**
20 * @author Johannes M. Schmitt <schmittjoh@gmail.com> 20 * @author Johannes M. Schmitt <schmittjoh@gmail.com>
21 * @author Robin Chalas <robin.chalas@gmail.com> 21 * @author Robin Chalas <robin.chalas@gmail.com>
35 { 35 {
36 if (!$container->hasDefinition($this->validatorFactoryServiceId)) { 36 if (!$container->hasDefinition($this->validatorFactoryServiceId)) {
37 return; 37 return;
38 } 38 }
39 39
40 $validators = array(); 40 $validators = [];
41 foreach ($container->findTaggedServiceIds($this->constraintValidatorTag, true) as $id => $attributes) { 41 foreach ($container->findTaggedServiceIds($this->constraintValidatorTag, true) as $id => $attributes) {
42 $definition = $container->getDefinition($id); 42 $definition = $container->getDefinition($id);
43 43
44 if (isset($attributes[0]['alias'])) { 44 if (isset($attributes[0]['alias'])) {
45 $validators[$attributes[0]['alias']] = new Reference($id); 45 $validators[$attributes[0]['alias']] = new Reference($id);