diff --git a/core/lib/Drupal/Core/Validation/ConstraintValidatorBase.php b/core/lib/Drupal/Core/Validation/ConstraintValidatorBase.php
deleted file mode 100644
index c2b075a..0000000
--- a/core/lib/Drupal/Core/Validation/ConstraintValidatorBase.php
+++ /dev/null
@@ -1,31 +0,0 @@
-<?php
-
-namespace Drupal\Core\Validation;
-
-use Symfony\Component\Validator\Constraint;
-use Symfony\Component\Validator\ConstraintValidatorInterface;
-use Symfony\Component\Validator\ExecutionContextInterface;
-use Symfony\Component\Validator\Violation\ConstraintViolationBuilderInterface;
-use Symfony\Component\Validator\Violation\LegacyConstraintViolationBuilder;
-
-/**
- * Base class for constraint validator that are also constraints.
- *
- * Copied from \Symfony\Component\Validator\ConstraintValidator with minor
- * modifications.
- */
-abstract class ConstraintValidatorBase extends Constraint implements ConstraintValidatorInterface {
-
-    /**
-     * @var 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 ec5162d..7d0e4fb 100644
--- a/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraintValidator.php
+++ b/core/modules/link/src/Plugin/Validation/Constraint/LinkAccessConstraintValidator.php
@@ -7,7 +7,6 @@
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\Validator\Constraint;
 use Symfony\Component\Validator\ConstraintValidator;
-use Symfony\Component\Validator\Context\ExecutionContextInterface;
 
 /**
  * Validates the LinkAccess constraint.
@@ -15,13 +14,6 @@
 class LinkAccessConstraintValidator extends ConstraintValidator implements ContainerInjectionInterface {
 
   /**
-   * Stores the validator's state during validation.
-   *
-   * @var \Symfony\Component\Validator\Context\ExecutionContextInterface
-   */
-  protected $context;
-
-  /**
    * Proxy for the current user account.
    *
    * @var \Drupal\Core\Session\AccountProxyInterface
diff --git a/core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidator.php b/core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidator.php
index 06f3ac1..0bc178a 100644
--- a/core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidator.php
+++ b/core/modules/link/src/Plugin/Validation/Constraint/LinkExternalProtocolsConstraintValidator.php
@@ -5,7 +5,6 @@
 use Drupal\Component\Utility\UrlHelper;
 use Symfony\Component\Validator\Constraint;
 use Symfony\Component\Validator\ConstraintValidator;
-use Symfony\Component\Validator\Context\ExecutionContextInterface;
 
 /**
  * Validates the LinkExternalProtocols constraint.
@@ -13,13 +12,6 @@
 class LinkExternalProtocolsConstraintValidator extends ConstraintValidator {
 
   /**
-   * Stores the validator's state during validation.
-   *
-   * @var \Symfony\Component\Validator\Context\ExecutionContextInterface
-   */
-  protected $context;
-
-  /**
    * {@inheritdoc}
    */
   public function validate($value, Constraint $constraint) {
diff --git a/core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidator.php b/core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidator.php
index 1d3b15e..4621813 100644
--- a/core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidator.php
+++ b/core/modules/link/src/Plugin/Validation/Constraint/LinkNotExistingInternalConstraintValidator.php
@@ -7,7 +7,6 @@
 use Symfony\Component\Routing\Exception\RouteNotFoundException;
 use Symfony\Component\Validator\Constraint;
 use Symfony\Component\Validator\ConstraintValidator;
-use Symfony\Component\Validator\Context\ExecutionContextInterface;
 
 /**
  * Validates the LinkNotExistingInternal constraint.
@@ -15,13 +14,6 @@
 class LinkNotExistingInternalConstraintValidator extends ConstraintValidator {
 
   /**
-   * Stores the validator's state during validation.
-   *
-   * @var \Symfony\Component\Validator\Context\ExecutionContextInterface
-   */
-  protected $context;
-
-  /**
    * {@inheritdoc}
    */
   public function validate($value, Constraint $constraint) {
diff --git a/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php b/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php
index f3e8c30..52171d6 100644
--- a/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php
+++ b/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php
@@ -2,11 +2,7 @@
 
 namespace Drupal\link\Plugin\Validation\Constraint;
 
-use Drupal\Core\Validation\ConstraintValidatorBase;
-use Drupal\link\LinkItemInterface;
 use Symfony\Component\Validator\Constraint;
-use Symfony\Component\Validator\ConstraintValidator;
-use Symfony\Component\Validator\Context\ExecutionContextInterface;
 
 /**
  * Validation constraint for links receiving data allowed by its settings.
@@ -16,52 +12,8 @@
  *   label = @Translation("Link data valid for link type.", context = "Validation"),
  * )
  */
-class LinkTypeConstraint extends ConstraintValidatorBase {
+class LinkTypeConstraint extends Constraint {
 
   public $message = "The path '@uri' is invalid.";
 
-  /**
-   * {@inheritdoc}
-   */
-  public function validatedBy() {
-    return get_class($this);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function validate($value, Constraint $constraint) {
-    if (isset($value)) {
-      $uri_is_valid = TRUE;
-
-      /** @var $link_item \Drupal\link\LinkItemInterface */
-      $link_item = $value;
-      $link_type = $link_item->getFieldDefinition()->getSetting('link_type');
-
-      // Try to resolve the given URI to a URL. It may fail if it's schemeless.
-      try {
-        $url = $link_item->getUrl();
-      }
-      catch (\InvalidArgumentException $e) {
-        $uri_is_valid = FALSE;
-      }
-
-      // If the link field doesn't support both internal and external links,
-      // check whether the URL (a resolved URI) is in fact violating either
-      // restriction.
-      if ($uri_is_valid && $link_type !== LinkItemInterface::LINK_GENERIC) {
-        if (!($link_type & LinkItemInterface::LINK_EXTERNAL) && $url->isExternal()) {
-          $uri_is_valid = FALSE;
-        }
-        if (!($link_type & LinkItemInterface::LINK_INTERNAL) && !$url->isExternal()) {
-          $uri_is_valid = FALSE;
-        }
-      }
-
-      if (!$uri_is_valid) {
-        $this->context->addViolation($this->message, array('@uri' => $link_item->uri));
-      }
-    }
-  }
-
 }
diff --git a/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php b/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraintValidator.php
similarity index 67%
copy from core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php
copy to core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraintValidator.php
index f3e8c30..a67eb4d 100644
--- a/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraint.php
+++ b/core/modules/link/src/Plugin/Validation/Constraint/LinkTypeConstraintValidator.php
@@ -2,30 +2,14 @@
 
 namespace Drupal\link\Plugin\Validation\Constraint;
 
-use Drupal\Core\Validation\ConstraintValidatorBase;
 use Drupal\link\LinkItemInterface;
 use Symfony\Component\Validator\Constraint;
 use Symfony\Component\Validator\ConstraintValidator;
-use Symfony\Component\Validator\Context\ExecutionContextInterface;
 
 /**
- * Validation constraint for links receiving data allowed by its settings.
- *
- * @Constraint(
- *   id = "LinkType",
- *   label = @Translation("Link data valid for link type.", context = "Validation"),
- * )
+ * Constraint validator for links receiving data allowed by its settings.
  */
-class LinkTypeConstraint extends ConstraintValidatorBase {
-
-  public $message = "The path '@uri' is invalid.";
-
-  /**
-   * {@inheritdoc}
-   */
-  public function validatedBy() {
-    return get_class($this);
-  }
+class LinkTypeConstraintValidator extends ConstraintValidator {
 
   /**
    * {@inheritdoc}
@@ -59,7 +43,7 @@ public function validate($value, Constraint $constraint) {
       }
 
       if (!$uri_is_valid) {
-        $this->context->addViolation($this->message, array('@uri' => $link_item->uri));
+        $this->context->addViolation($constraint->message, array('@uri' => $link_item->uri));
       }
     }
   }
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 8271c59..c2290bc 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
@@ -5,6 +5,7 @@
 use Drupal\link\Plugin\Validation\Constraint\LinkAccessConstraint;
 use Drupal\link\Plugin\Validation\Constraint\LinkAccessConstraintValidator;
 use Drupal\Tests\UnitTestCase;
+use Symfony\Component\Validator\Context\ExecutionContextInterface;
 
 /**
  * Tests the LinkAccessConstraintValidator validator.
@@ -29,7 +30,7 @@ class LinkAccessConstraintValidatorTest extends UnitTestCase {
    * @dataProvider providerValidate
    */
   public function testValidate($value, $user, $valid) {
-    $context = $this->getMock('Symfony\Component\Validator\Context\ExecutionContextInterface');
+    $context = $this->getMock(ExecutionContextInterface::class);
 
     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 a326b57..0de416f 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
@@ -7,6 +7,7 @@
 use Drupal\link\Plugin\Validation\Constraint\LinkExternalProtocolsConstraint;
 use Drupal\link\Plugin\Validation\Constraint\LinkExternalProtocolsConstraintValidator;
 use Drupal\Tests\UnitTestCase;
+use Symfony\Component\Validator\Context\ExecutionContextInterface;
 
 /**
  * @coversDefaultClass \Drupal\link\Plugin\Validation\Constraint\LinkExternalProtocolsConstraintValidator
@@ -19,7 +20,7 @@ class LinkExternalProtocolsConstraintValidatorTest extends UnitTestCase {
    * @dataProvider providerValidate
    */
   public function testValidate($value, $valid) {
-    $context = $this->getMock('Symfony\Component\Validator\Context\ExecutionContextInterface');
+    $context = $this->getMock(ExecutionContextInterface::class);
 
     if ($valid) {
       $context->expects($this->never())
@@ -77,7 +78,7 @@ public function testValidateWithMalformedUri() {
       ->method('getUrl')
       ->willThrowException(new \InvalidArgumentException());
 
-    $context = $this->getMock('Symfony\Component\Validator\Context\ExecutionContextInterface');
+    $context = $this->getMock(ExecutionContextInterface::class);
     $context->expects($this->never())
       ->method('addViolation');
 
@@ -97,7 +98,7 @@ public function testValidateIgnoresInternalUrls() {
       ->method('getUrl')
       ->willReturn(Url::fromRoute('example.test'));
 
-    $context = $this->getMock('Symfony\Component\Validator\Context\ExecutionContextInterface');
+    $context = $this->getMock(ExecutionContextInterface::class);
     $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 2f0f7b5..41ecd4a 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
@@ -7,6 +7,7 @@
 use Drupal\link\Plugin\Validation\Constraint\LinkNotExistingInternalConstraintValidator;
 use Drupal\Tests\UnitTestCase;
 use Symfony\Component\Routing\Exception\RouteNotFoundException;
+use Symfony\Component\Validator\Context\ExecutionContextInterface;
 
 /**
  * @coversDefaultClass \Drupal\link\Plugin\Validation\Constraint\LinkNotExistingInternalConstraintValidator
@@ -19,7 +20,7 @@ class LinkNotExistingInternalConstraintValidatorTest extends UnitTestCase {
    * @dataProvider providerValidate
    */
   public function testValidate($value, $valid) {
-    $context = $this->getMock('Symfony\Component\Validator\Context\ExecutionContextInterface');
+    $context = $this->getMock(ExecutionContextInterface::class);
 
     if ($valid) {
       $context->expects($this->never())
@@ -94,7 +95,7 @@ public function testValidateWithMalformedUri() {
       ->method('getUrl')
       ->willThrowException(new \InvalidArgumentException());
 
-    $context = $this->getMock('Symfony\Component\Validator\Context\ExecutionContextInterface');
+    $context = $this->getMock(ExecutionContextInterface::class);
     $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 4257a70..b500a8d 100644
--- a/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php
+++ b/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php
@@ -2,11 +2,7 @@
 
 namespace Drupal\user\Plugin\Validation\Constraint;
 
-use Drupal\Core\Validation\ConstraintValidatorBase;
-
-use Symfony\Component\Validator\ConstraintValidator;
 use Symfony\Component\Validator\Constraint;
-use Symfony\Component\Validator\Context\ExecutionContextInterface;
 
 /**
  * Checks if the user's email address is provided if required.
@@ -20,7 +16,7 @@
  *   label = @Translation("User email required", context = "Validation")
  * )
  */
-class UserMailRequired extends ConstraintValidatorBase {
+class UserMailRequired extends Constraint {
 
   /**
    * Violation message. Use the same message as FormValidator.
@@ -32,33 +28,4 @@ class UserMailRequired extends ConstraintValidatorBase {
    */
   public $message = '@name field is required.';
 
-  /**
-   * {@inheritdoc}
-   */
-  public function validatedBy() {
-    return get_class($this);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function validate($items, Constraint $constraint) {
-    /** @var \Drupal\Core\Field\FieldItemListInterface $items */
-    /** @var \Drupal\user\UserInterface $account */
-    $account = $items->getEntity();
-    $existing_value = NULL;
-    if ($account->id()) {
-      $account_unchanged = \Drupal::entityManager()
-        ->getStorage('user')
-        ->loadUnchanged($account->id());
-      $existing_value = $account_unchanged->getEmail();
-    }
-
-    $required = !(!$existing_value && \Drupal::currentUser()->hasPermission('administer users'));
-
-    if ($required && (!isset($items) || $items->isEmpty())) {
-      $this->context->addViolation($this->message, ['@name' => $account->getFieldDefinition('mail')->getLabel()]);
-    }
-  }
-
 }
diff --git a/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php b/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequiredValidator.php
similarity index 57%
copy from core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php
copy to core/modules/user/src/Plugin/Validation/Constraint/UserMailRequiredValidator.php
index 4257a70..7e20b7a 100644
--- a/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequired.php
+++ b/core/modules/user/src/Plugin/Validation/Constraint/UserMailRequiredValidator.php
@@ -2,11 +2,8 @@
 
 namespace Drupal\user\Plugin\Validation\Constraint;
 
-use Drupal\Core\Validation\ConstraintValidatorBase;
-
 use Symfony\Component\Validator\ConstraintValidator;
 use Symfony\Component\Validator\Constraint;
-use Symfony\Component\Validator\Context\ExecutionContextInterface;
 
 /**
  * Checks if the user's email address is provided if required.
@@ -14,30 +11,8 @@
  * The user mail field is NOT required if account originally had no mail set
  * and the user performing the edit has 'administer users' permission.
  * This allows users without email address to be edited and deleted.
- *
- * @Constraint(
- *   id = "UserMailRequired",
- *   label = @Translation("User email required", context = "Validation")
- * )
  */
-class UserMailRequired extends ConstraintValidatorBase {
-
-  /**
-   * Violation message. Use the same message as FormValidator.
-   *
-   * Note that the name argument is not sanitized so that translators only have
-   * one string to translate. The name is sanitized in self::validate().
-   *
-   * @var string
-   */
-  public $message = '@name field is required.';
-
-  /**
-   * {@inheritdoc}
-   */
-  public function validatedBy() {
-    return get_class($this);
-  }
+class UserMailRequiredValidator extends ConstraintValidator {
 
   /**
    * {@inheritdoc}
@@ -57,7 +32,7 @@ public function validate($items, Constraint $constraint) {
     $required = !(!$existing_value && \Drupal::currentUser()->hasPermission('administer users'));
 
     if ($required && (!isset($items) || $items->isEmpty())) {
-      $this->context->addViolation($this->message, ['@name' => $account->getFieldDefinition('mail')->getLabel()]);
+      $this->context->addViolation($constraint->message, ['@name' => $account->getFieldDefinition('mail')->getLabel()]);
     }
   }
 
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 0370461..69edf3b 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
@@ -5,6 +5,7 @@
 use Drupal\Tests\UnitTestCase;
 use Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraint;
 use Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraintValidator;
+use Symfony\Component\Validator\Context\ExecutionContextInterface;
 
 /**
  * @coversDefaultClass \Drupal\user\Plugin\Validation\Constraint\ProtectedUserFieldConstraintValidator
@@ -47,7 +48,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\Context\ExecutionContextInterface');
+    $context = $this->getMock(ExecutionContextInterface::class);
 
     if ($expected_violation) {
       $context->expects($this->once())
diff --git a/core/tests/Drupal/Tests/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidatorTest.php b/core/tests/Drupal/Tests/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidatorTest.php
index 12f36ea..6647e5f 100644
--- a/core/tests/Drupal/Tests/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidatorTest.php
+++ b/core/tests/Drupal/Tests/Core/Validation/Plugin/Validation/Constraint/PrimitiveTypeConstraintValidatorTest.php
@@ -13,6 +13,7 @@
 use Drupal\Core\Validation\Plugin\Validation\Constraint\PrimitiveTypeConstraintValidator;
 use Drupal\Core\StringTranslation\TranslatableMarkup;
 use Drupal\Tests\UnitTestCase;
+use Symfony\Component\Validator\Context\ExecutionContextInterface;
 
 /**
  * @coversDefaultClass \Drupal\Core\Validation\Plugin\Validation\Constraint\PrimitiveTypeConstraintValidator
@@ -26,7 +27,7 @@ class PrimitiveTypeConstraintValidatorTest extends UnitTestCase {
    * @dataProvider provideTestValidate
    */
   public function testValidate(PrimitiveInterface $typed_data, $value, $valid) {
-    $context = $this->getMock('\Symfony\Component\Validator\Context\ExecutionContextInterface');
+    $context = $this->getMock(ExecutionContextInterface::class);
     $context->expects($this->any())
       ->method('getObject')
       ->willReturn($typed_data);
