Repository navigation
Broaden egulias/email-validator dependency version to include 3.x - #194
stevebauman merged 2 commits into
Conversation
|
Thanks for the PR @yansongda! This appears to be incorrect and required by downstream Symfony: https://github.com/DirectoryTree/ImapEngine/actions/runs/40491322988/job/125518679745
I'll see if there's a way around this to avoid having to use the dependency. |
|
Ok I dug into this a bit more. We do need Egulias because However, we don’t need to restrict it to I tested with Egulias 3.2.6 and 4.0.4, and the unit and integration suites pass with both. I've updated this PR to broaden the constraint instead of removing the dependency. We can investigate removing it entirely in another issue + PR so we can patch this now quick. |
|
Thanks for digging into this instead of just closing it. My grep only covered src/ and tests/, so I missed that Mime\Address needs egulias at runtime. Keeping it was the right call, and ^3.0|^4.0 is a better fix than what I proposed anyway. Thanks for running it against 3.2.6 and 4.0.4 yourself |
|
Happy to help @yansongda! |

Summary
egulias/email-validatoris declared inrequire, but nothing in this package uses it:Eguliasreference anywhere insrc/ortests/. A repo-wide search only matches thecomposer.jsondeclaration itself.symfony/mime(6.4 and 7.x) has neither arequirenor asuggestentry for it, andzbateson/mail-mime-parserdoes not reference it.Why it matters
An unused dependency in
requireis not free: it becomes a hard constraint for every consumer. This one pins^4.0, which conflicts with packages still on^3.0, such ashyperf/validation(verified onv3.2.5and onmaster). The two ranges do not intersect, so those projects cannot install ImapEngine at all today, even though neither side uses the validator.There is a related PR open on the Hyperf side (hyperf/hyperf#7833) that relaxes their constraint to
^3.0 || ^4.0. That fix and this one are complementary rather than redundant: relaxing the constraint downstream widens the intersection, while dropping the unused requirement here removes the reason for the pin in the first place. This package needs nothing from egulias, so it should not constrain which major version a consumer uses.For reference,
illuminate/validationhas accepted^3.2.1|^4.0/^3.2.5|^4.0since 9.x, so there is no conflict on the Laravel side — the Hyperf case is the one that surfaces.Change
composer.jsononly, one line removed:No source code changes, so behaviour is unchanged.
Verification
egulias/email-validatortransitively, so this is the only change in resolution.run-testsandrun-integration-tests) runs on this PR for the usual matrix.Alternative
If you would rather keep the dependency for backward compatibility, the constraint can be relaxed to
^3.0 || ^4.0instead of being removed. I'm happy to switch this PR to that approach.