Problem/Motivation

Per https://www.drupal.org/node/2997196 this is no longer used.

It depends on doctrine/lexer, which has uncertain support status, and therefore complicates #3104265: Update Composer dependencies on Doctrine components in 9.0.x.

Proposed resolution

Remove it.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

catch created an issue. See original summary.

catch’s picture

Status: Active » Needs review
StatusFileSize
new3.82 KB

Here's a patch.

composer remove doesn't work with the new meta package stuff, so I just hacked it out of composer.json and composer.lock

mglaman’s picture

Isn't it still used by the EmailValidator component?

use Egulias\EmailValidator\EmailValidator as EmailValidatorUtility;
use Egulias\EmailValidator\Validation\EmailValidation;
use Egulias\EmailValidator\Validation\RFCValidation;
mglaman’s picture

I opened an issue on doctrine/lexer to get clarification about the version support: https://github.com/doctrine/lexer/issues/39

andypost’s picture

Restarted tests, there's some broken ones and core/composer.json states "egulias/email-validator": "^2.0",

btw Core could use SF constraint https://api.drupal.org/api/drupal/vendor%21symfony%21validator%21Constra...

It has extra options for domains and could be a way to IDN

catch’s picture

Issue summary: View changes
StatusFileSize
new4.82 KB
new1 KB

@mglaman it's an optional dependency for Symfony's e-mail validator component, but it's only included in require-dev, so we can remove our own dependency as long as we don't do strict e-mail checking using Symfony's e-mail validator.

Missed a couple of refs in the above patch, trying again.

Also updating the issue summary since doctrine/lexer isn't actually deprecated (whoops), it's the lexer bits of Doctrine\Common that were deprecated, however we should still remove the unused dependency here and it's still a very confusing situation with lexer support status.

andypost’s picture

Fatal error: Class 'Egulias\EmailValidator\EmailValidator' not found in /var/www/html/core/lib/Drupal/Component/Utility/EmailValidator.php on line 12

points it is used

mglaman’s picture

Per #9, my point (and I forgot a line) in #5 was that a component class extends it.

longwave’s picture

The OP states that https://www.drupal.org/node/2997196 says it can be removed, but that's not what that change record is about - we wrapped egulias/email-validator and provided an interface so we didn't rely on the exact implementation and it could be swapped out as per #2749873: "email.validator" core service cannot be easily replaced. We still use this dependency as the email validation service pretty much everywhere we want to validate an email address.

If we do want to remove it we will have to switch our EmailValidator component to use Symfony\Component\Validator\Constraints\EmailValidator first.

catch’s picture

Status: Needs review » Closed (works as designed)

Arggh sorry I think this is just bad grepping on my part. Dead end here. We can do the Symfony switch maybe but that has its own issue.

mile23’s picture

You know why you think this issue is fixed? :-)

Because we never fixed the composer.json for drupal/core-utility: #2876669-65: Fix dependency version requirement declarations in components

That is, drupal/core-utility still has a hard dependency on egulias which is unexpressed.