PHPackages                             nepada/email-address-doctrine - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. nepada/email-address-doctrine

ActiveLibrary[Database &amp; ORM](/categories/database)

nepada/email-address-doctrine
=============================

Email address type for Doctrine.

v1.8.2(8mo ago)411.4k↓35.6%BSD-3-ClausePHPPHP &gt;=8.1.0 &lt;8.6CI passing

Since Jun 5Pushed 3d ago1 watchersCompare

[ Source](https://github.com/nepada/email-address-doctrine)[ Packagist](https://packagist.org/packages/nepada/email-address-doctrine)[ RSS](/packages/nepada-email-address-doctrine/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (10)Dependencies (16)Versions (22)Used By (0)

Email address Doctrine type
===========================

[](#email-address-doctrine-type)

[![Build Status](https://github.com/nepada/email-address-doctrine/workflows/CI/badge.svg)](https://github.com/nepada/email-address-doctrine/actions?query=workflow%3ACI+branch%3Amaster)[![Coverage Status](https://camo.githubusercontent.com/01db8bede29d8471ec94194d1366a26e7eb55eaed15fe012c19baf159c8519b4/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6e65706164612f656d61696c2d616464726573732d646f637472696e652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/nepada/email-address-doctrine?branch=master)[![Downloads this Month](https://camo.githubusercontent.com/05e32c11bf373546b685f6f02e3594f5e332f116103d4861520954e812fa6302/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f6e65706164612f656d61696c2d616464726573732d646f637472696e652e737667)](https://packagist.org/packages/nepada/email-address-doctrine)[![Latest stable](https://camo.githubusercontent.com/cc4c1172eef1ce4a16530ca43158d726aa9ea6b7c750560806e9e11edb85baa0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e65706164612f656d61696c2d616464726573732d646f637472696e652e737667)](https://packagist.org/packages/nepada/email-address-doctrine)

Installation
------------

[](#installation)

Via Composer:

```
$ composer require nepada/email-address-doctrine
```

Register the types in your bootstrap:

```
\Doctrine\DBAL\Types\Type::addType(
    \Nepada\EmailAddress\RfcEmailAddress::class,
    \Nepada\EmailAddressDoctrine\RfcEmailAddressType::class
);
\Doctrine\DBAL\Types\Type::addType(
    \Nepada\EmailAddress\CaseInsensitiveEmailAddress::class,
    \Nepada\EmailAddressDoctrine\CaseInsensitiveEmailAddressType::class
);
```

In Nette with [nettrine/dbal](https://github.com/nettrine/dbal) integration, you can register the types in your configuration:

```
dbal:
    connection:
        types:
            Nepada\EmailAddress\RfcEmailAddress: Nepada\EmailAddressDoctrine\RfcEmailAddressType
            Nepada\EmailAddress\CaseInsensitiveEmailAddress: Nepada\EmailAddressDoctrine\CaseInsensitiveEmailAddressType
```

Usage
-----

[](#usage)

This package provides two Doctrine types:

1. `RfcEmailAddressType` for storing emails represented by `RfcEmailAddress`.
2. `CaseInsensitiveEmailAddressType` for storing emails represented by `CaseInsensitiveEmailAddress`.

Both types normalize the domain part of the email address before storing it in database, but they differ in handling of the local part of the address. See [nepada/email-address](https://github.com/nepada/email-address) for further details.

Example usage in the entity:

```
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Nepada\EmailAddress\CaseInsensitiveEmailAddress;

#[Entity]
class Contact
{

    #[Column(type: CaseInsensitiveEmailAddress::class, nullable: false)]
    private CaseInsensitiveEmailAddress $email;

    public function getEmailAddress(): CaseInsensitiveEmailAddress
    {
        return $this->emailAddress;
    }

}
```

Example usage in query builder:

```
$result = $repository->createQueryBuilder('foo')
    ->select('foo')
    ->where('foo.email = :emailAddress')
     // the parameter value is automatically normalized to example@example.com
    ->setParameter('emailAddress', 'Example@Example.com', CaseInsensitiveEmailAddress::class)
    ->getQuery()
    ->getResult();
```

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance81

Actively maintained with recent releases

Popularity29

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity90

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 57.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~191 days

Recently: every ~278 days

Total

15

Last Release

266d ago

PHP version history (8 changes)v1.0.0PHP &gt;=7.1.0

v1.2.0PHP &gt;=7.2.0

v1.3.0PHP &gt;=7.4.0

v1.5.0PHP &gt;=7.4.0 &lt;8.2

v1.6.0PHP &gt;=7.4.0 &lt;8.3

v1.7.0PHP &gt;=8.1.0 &lt;8.4

v1.8.1PHP &gt;=8.1.0 &lt;8.5

v1.8.2PHP &gt;=8.1.0 &lt;8.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/5b4780fe328102c4572737db639653c29d3081d1d3e051467f00d7f09a776399?d=identicon)[xificurk](/maintainers/xificurk)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (164 commits)")[![xificurk](https://avatars.githubusercontent.com/u/117465?v=4)](https://github.com/xificurk "xificurk (122 commits)")

---

Tags

netteValue Objectdoctrineemail address

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nepada-email-address-doctrine/health.svg)

```
[![Health](https://phpackages.com/badges/nepada-email-address-doctrine/health.svg)](https://phpackages.com/packages/nepada-email-address-doctrine)
```

###  Alternatives

[martin-georgiev/postgresql-for-doctrine

Extends Doctrine with native PostgreSQL support for arrays, JSONB, ranges, PostGIS geometries, text search, ltree, uuid, and 100+ PostgreSQL-specific functions.

4585.8M4](/packages/martin-georgiev-postgresql-for-doctrine)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8465.5M96](/packages/laravel-doctrine-orm)[kdyby/doctrine

Doctrine integration into Nette Framework

1091.0M86](/packages/kdyby-doctrine)[flow-php/doctrine-dbal-bulk

Bulk inserts and updates for Doctrine DBAL

14385.8k4](/packages/flow-php-doctrine-dbal-bulk)[nettrine/dbal

Doctrine DBAL for Nette Framework

332.7M24](/packages/nettrine-dbal)[yokai/doctrine-value-object

Value Objects for Doctrine ORM simplified

1336.8k1](/packages/yokai-doctrine-value-object)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
