Skip to content

Fix: protonmail subaddressing#21

Merged
Meldiron merged 4 commits into
mainfrom
fix-proton-canonical-mails
May 20, 2026
Merged

Fix: protonmail subaddressing#21
Meldiron merged 4 commits into
mainfrom
fix-proton-canonical-mails

Conversation

@Meldiron
Copy link
Copy Markdown
Contributor

No description provided.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 20, 2026

Greptile Summary

This PR fixes ProtonMail subaddressing by stripping plus-addressing from the local part during canonicalisation, adds protonmail.ch as a supported domain, and stops normalising all ProtonMail domains to protonmail.com (each domain is now its own canonical form). The test suite is updated throughout to match the new behaviour.

  • Protonmail.php now calls removePlusAddressing() so user+tag@protonmail.comuser@protonmail.com, while dots are preserved.
  • protonmail.ch is added to SUPPORTED_DOMAINS with corresponding test coverage.
  • composer.lock pulls in utopia-php/domains 2.1.0, which raises the transitive PHP requirement to >=8.3 — conflicting with the project's stated php: ">=8.0" floor.

Confidence Score: 4/5

Safe to merge once the PHP version floor in composer.json is reconciled with the new transitive dependency requirement from utopia-php/domains 2.1.0.

The utopia-php/domains 2.1.0 upgrade in the lock file now requires PHP >=8.3, but composer.json still declares php: ">=8.0". Any consumer or CI environment on PHP 8.0–8.2 will fail at composer install. The core normalisation logic is straightforward and well-covered by tests; the only blocker is the PHP constraint mismatch introduced as a side-effect of updating the lock file.

composer.lock — the utopia-php/domains version bump there conflicts with the PHP version floor in composer.json

Important Files Changed

Filename Overview
composer.lock Upgrades utopia-php/domains to 2.1.0, which bumps its PHP requirement to >=8.3, conflicting with the project's declared php: ">=8.0" in composer.json; also includes unrelated dev-dependency version changes
src/Emails/Canonicals/Providers/Protonmail.php Adds plus-addressing removal for ProtonMail and protonmail.ch domain support; stops normalizing all ProtonMail domains to protonmail.com (domain aliasing change already discussed in prior threads)
tests/Canonicals/Providers/ProtonmailTest.php Test cases updated to reflect new plus-addressing removal and per-domain canonical behaviour; protonmail.ch added throughout
tests/EmailTest.php Integration tests updated consistently with the new ProtonMail normalisation rules; all changed assertions align with the new behaviour

Comments Outside Diff (1)

  1. composer.lock, line 2013-2015 (link)

    P1 PHP version constraint mismatch from utopia-php/domains upgrade

    composer.json declares "php": ">=8.0", but the lock file now pins utopia-php/domains at 2.1.0, which requires "php": ">=8.3". Any consumer (or CI environment) running PHP 8.0, 8.1, or 8.2 will fail at composer install because the transitive constraint is enforced at install time. Either the composer.json PHP floor should be raised to >=8.3, or utopia-php/domains should stay on a ^2.0-compatible release that still allows PHP 8.0–8.2.

Reviews (2): Last reviewed commit: "PR review fixes" | Re-trigger Greptile

Comment thread src/Emails/Canonicals/Providers/Protonmail.php
Comment thread src/Emails/Canonicals/Providers/Protonmail.php Outdated
Comment thread src/Emails/Canonicals/Providers/Protonmail.php Outdated
@Meldiron Meldiron merged commit a5f1d11 into main May 20, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant