diff --git a/core/lib/Drupal/Core/Validation/ConstraintValidatorBase.php b/core/lib/Drupal/Core/Validation/ConstraintValidatorBase.php
new file mode 100644
index 0000000..e11c4d0
--- /dev/null
+++ b/core/lib/Drupal/Core/Validation/ConstraintValidatorBase.php
@@ -0,0 +1,33 @@
+<?php
+
+namespace Drupal\Core\Validation;
+
+use Symfony\Component\Validator\Constraint;
+use Symfony\Component\Validator\ConstraintValidatorInterface;
+use Symfony\Component\Validator\ExecutionContextInterface;
+
+/**
+ * Base class for constraint validators that are also constraints.
+ *
+ * This class was introduced to provide compatiblity for Symfony 2.8 and Symfony
+ * 3 where ExecutionContextInterface was moved to a different namespace. Modules
+ * providing constraints should extend this base class to be compatible with the
+ * method signature of initialize() in both versions.
+ */
+abstract class ConstraintValidatorBase extends Constraint implements ConstraintValidatorInterface {
+
+    /**
+     * Stores the validator's state during validation.
+     *
+     * @var \Symfony\Component\Validator\ExecutionContextInterface
+     */
+    protected $context;
+
+    /**
+     * {@inheritdoc}
+     */
+    public function initialize(ExecutionContextInterface $context) {
+      $this->context = $context;
+    }
+
+}
diff --git a/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraintValidator.php b/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraintValidator.php
index f2a5f83..7d0e4fb 100644
--- a/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraintValidator.php
+++ b/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraintValidator.php
@@ -6,20 +6,12 @@
 use Drupal\Core\DependencyInjection\ContainerInjectionInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\Validator\Constraint;
-use Symfony\Component\Validator\ConstraintValidatorInterface;
-use Symfony\Component\Validator\ExecutionContextInterface;
+use Symfony\Component\Validator\ConstraintValidator;
 
 /**
  * Validates the LinkAccess constraint.
  */
-class LinkAccessConstraintValidator implements ConstraintValidatorInterface, ContainerInjectionInterface {
-
-  /**
-   * Stores the validator's state during validation.
-   *
-   * @var \Symfony\Component\Validator\ExecutionContextInterface
-   */
-  protected $context;
+class LinkAccessConstraintValidator extends ConstraintValidator implements ContainerInjectionInterface {
 
   /**
    * Proxy for the current user account.
@@ -50,13 +42,6 @@ public static function create(ContainerInterface $container) {
   /**
    * {@inheritdoc}
    */
-  public function initialize(ExecutionContextInterface $context) {
-    $this->context = $context;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
   public function validate($value, Constraint $constraint) {
     if (isset($value)) {
       try {
diff --git a/core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidator.php b/core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidator.php
index e85de58..0bc178a 100644
--- a/core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidator.php
+++ b/core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidator.php
@@ -4,27 +4,12 @@
 
 use Drupal\Component\Utility\UrlHelper;
 use Symfony\Component\Validator\Constraint;
-use Symfony\Component\Validator\ConstraintValidatorInterface;
-use Symfony\Component\Validator\ExecutionContextInterface;
+use Symfony\Component\Validator\ConstraintValidator;
 
 /**
  * Validates the LinkExternalProtocols constraint.
  */
-class LinkExternalProtocolsConstraintValidator implements ConstraintValidatorInterface {
-
-  /**
-   * Stores the validator's state during validation.
-   *
-   * @var \Symfony\Component\Validator\ExecutionContextInterface
-   */
-  protected $context;
-
-  /**
-   * {@inheritdoc}
-   */
-  public function initialize(ExecutionContextInterface $context) {
-    $this->context = $context;
-  }
+class LinkExternalProtocolsConstraintValidator extends ConstraintValidator {
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidator.php b/core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidator.php
index 86c3866..4621813 100644
--- a/core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidator.php
+++ b/core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidator.php
@@ -6,27 +6,12 @@
 use Symfony\Component\Routing\Exception\MissingMandatoryParametersException;
 use Symfony\Component\Routing\Exception\RouteNotFoundException;
 use Symfony\Component\Validator\Constraint;
-use Symfony\Component\Validator\ConstraintValidatorInterface;
-use Symfony\Component\Validator\ExecutionContextInterface;
+use Symfony\Component\Validator\ConstraintValidator;
 
 /**
  * Validates the LinkNotExistingInternal constraint.
  */
-class LinkNotExistingInternalConstraintValidator implements ConstraintValidatorInterface {
-
-  /**
-   * Stores the validator's state during validation.
-   *
-   * @var \Symfony\Component\Validator\ExecutionContextInterface
-   */
-  protected $context;
-
-  /**
-   * {@inheritdoc}
-   */
-  public function initialize(ExecutionContextInterface $context) {
-    $this->context = $context;
-  }
+class LinkNotExistingInternalConstraintValidator extends ConstraintValidator {
 
   /**
    * {@inheritdoc}
diff --git a/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php b/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php
index 4f706f6..a5338a2 100644
--- a/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php
+++ b/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php
@@ -2,10 +2,9 @@
 
 namespace Drupal\link\Plugin\Validation\Constraint;
 
+use Drupal\Core\Validation\ConstraintValidatorBase;
 use Drupal\link\LinkItemInterface;
 use Symfony\Component\Validator\Constraint;
-use Symfony\Component\Validator\ConstraintValidatorInterface;
-use Symfony\Component\Validator\ExecutionContextInterface;
 
 /**
  * Validation constraint for links receiving data allowed by its settings.
@@ -15,23 +14,11 @@
  *   label = @Translation("Link data valid for link type.", context = "Validation"),
  * )
  */
-class LinkTypeConstraint extends Constraint implements ConstraintValidatorInterface {
+class LinkTypeConstraint extends ConstraintValidatorBase {
 
   public $message = "The path '@uri' is invalid.";
 
   /**
-   * @var \Symfony\Component\Validator\ExecutionContextInterface
-   */
-  protected $context;
-
-  /**
-   * {@inheritdoc}
-   */
-  public function initialize(ExecutionContextInterface $context) {
-    $this->context = $context;
-  }
-
-  /**
    * {@inheritdoc}
    */
   public function validatedBy() {
diff --git a/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkAccessConstraintValidatorTest.php b/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkAccessConstraintValidatorTest.php
index 9e4623e..8271c59 100644
--- a/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkAccessConstraintValidatorTest.php
+++ b/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkAccessConstraintValidatorTest.php
@@ -29,7 +29,7 @@ class LinkAccessConstraintValidatorTest extends UnitTestCase {
    * @dataProvider providerValidate
    */
   public function testValidate($value, $user, $valid) {
-    $context = $this->getMock('Symfony\Component\Validator\ExecutionContextInterface');
+    $context = $this->getMock('Symfony\Component\Validator\Context\ExecutionContextInterface');
 
     if ($valid) {
       $context->expects($this->never())
diff --git a/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php b/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php
index 771b307..a326b57 100644
--- a/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php
+++ b/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidatorTest.php
@@ -19,7 +19,7 @@ class LinkExternalProtocolsConstraintValidatorTest extends UnitTestCase {
    * @dataProvider providerValidate
    */
   public function testValidate($value, $valid) {
-    $context = $this->getMock('Symfony\Component\Validator\ExecutionContextInterface');
+    $context = $this->getMock('Symfony\Component\Validator\Context\ExecutionContextInterface');
 
     if ($valid) {
       $context->expects($this->never())
@@ -77,7 +77,7 @@ public function testValidateWithMalformedUri() {
       ->method('getUrl')
       ->willThrowException(new \InvalidArgumentException());
 
-    $context = $this->getMock('Symfony\Component\Validator\ExecutionContextInterface');
+    $context = $this->getMock('Symfony\Component\Validator\Context\ExecutionContextInterface');
     $context->expects($this->never())
       ->method('addViolation');
 
@@ -97,7 +97,7 @@ public function testValidateIgnoresInternalUrls() {
       ->method('getUrl')
       ->willReturn(Url::fromRoute('example.test'));
 
-    $context = $this->getMock('Symfony\Component\Validator\ExecutionContextInterface');
+    $context = $this->getMock('Symfony\Component\Validator\Context\ExecutionContextInterface');
     $context->expects($this->never())
       ->method('addViolation');
 
diff --git a/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidatorTest.php b/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidatorTest.php
index 69776fd..2f0f7b5 100644
--- a/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidatorTest.php
+++ b/core/modules/link/tests/src/Unit/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidatorTest.php
@@ -19,7 +19,7 @@ class LinkNotExistingInternalConstraintValidatorTest extends UnitTestCase {
    * @dataProvider providerValidate
    */
   public function testValidate($value, $valid) {
-    $context = $this->getMock('Symfony\Component\Validator\ExecutionContextInterface');
+    $context = $this->getMock('Symfony\Component\Validator\Context\ExecutionContextInterface');
 
     if ($valid) {
       $context->expects($this->never())
@@ -94,7 +94,7 @@ public function testValidateWithMalformedUri() {
       ->method('getUrl')
       ->willThrowException(new \InvalidArgumentException());
 
-    $context = $this->getMock('Symfony\Component\Validator\ExecutionContextInterface');
+    $context = $this->getMock('Symfony\Component\Validator\Context\ExecutionContextInterface');
     $context->expects($this->never())
       ->method('addViolation');
 
diff --git a/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php b/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php
index 5905e12..f527333 100644
--- a/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php
+++ b/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php
@@ -2,9 +2,9 @@
 
 namespace Drupal\user\Plugin\Validation\Constraint;
 
+use Drupal\Core\Validation\ConstraintValidatorBase;
+
 use Symfony\Component\Validator\Constraint;
-use Symfony\Component\Validator\ConstraintValidatorInterface;
-use Symfony\Component\Validator\ExecutionContextInterface;
 
 /**
  * Checks if the user's email address is provided if required.
@@ -18,7 +18,7 @@
  *   label = @Translation("User email required", context = "Validation")
  * )
  */
-class UserMailRequired extends Constraint implements ConstraintValidatorInterface {
+class UserMailRequired extends ConstraintValidatorBase {
 
   /**
    * Violation message. Use the same message as FormValidator.
@@ -31,18 +31,6 @@ class UserMailRequired extends Constraint implements ConstraintValidatorInterfac
   public $message = '@name field is required.';
 
   /**
-   * @var \Symfony\Component\Validator\ExecutionContextInterface
-   */
-  protected $context;
-
-  /**
-   * {@inheritdoc}
-   */
-  public function initialize(ExecutionContextInterface $context) {
-    $this->context = $context;
-  }
-
-  /**
    * {@inheritdoc}
    */
   public function validatedBy() {
diff --git a/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php b/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php
index d29c8c5..0370461 100644
--- a/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php
+++ b/core/modules/user/tests/src/Unit/Plugin/Validation/Constraint/ProtectedUserFieldConstraintValidatorTest.php
@@ -47,7 +47,7 @@ public function testValidate($items, $expected_violation, $name = FALSE) {
 
     // If a violation is expected, then the context's addViolation method will
     // be called, otherwise it should not be called.
-    $context = $this->getMock('Symfony\Component\Validator\ExecutionContextInterface');
+    $context = $this->getMock('Symfony\Component\Validator\Context\ExecutionContextInterface');
 
     if ($expected_violation) {
       $context->expects($this->once())
