4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Validator\Context;
14 @trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContext class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
16 use Symfony\Component\Translation\TranslatorInterface;
17 use Symfony\Component\Validator\MetadataFactoryInterface;
18 use Symfony\Component\Validator\Validator\ValidatorInterface;
21 * An execution context that is compatible with the legacy API (< 2.5).
23 * @author Bernhard Schussek <bschussek@gmail.com>
25 * @deprecated since version 2.5, to be removed in 3.0.
27 class LegacyExecutionContext extends ExecutionContext
30 * @var MetadataFactoryInterface
32 private $metadataFactory;
35 * Creates a new context.
37 * @see ExecutionContext::__construct()
39 * @internal Called by {@link LegacyExecutionContextFactory}. Should not be used
42 public function __construct(ValidatorInterface $validator, $root, MetadataFactoryInterface $metadataFactory, TranslatorInterface $translator, $translationDomain = null)
51 $this->metadataFactory = $metadataFactory;