PHPackages                             vasildakov/postcode-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. vasildakov/postcode-doctrine

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

vasildakov/postcode-doctrine
============================

UK Postcode Doctrine Type

1.0.4(9y ago)313MITPHPPHP &gt;=5.4

Since Oct 2Pushed 9y ago2 watchersCompare

[ Source](https://github.com/vasildakov/postcode-doctrine)[ Packagist](https://packagist.org/packages/vasildakov/postcode-doctrine)[ Docs](https://github.com/vasildakov/postcode-doctrine)[ RSS](/packages/vasildakov-postcode-doctrine/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (5)Dependencies (6)Versions (7)Used By (0)

Doctrine UK Postcode Type
=========================

[](#doctrine-uk-postcode-type)

Doctrine UK Postcode Type

[![Build Status](https://camo.githubusercontent.com/2d6a803076c40cd6e82ad523e67fca515bdc09d35d0a30357040cab22bbf5db4/68747470733a2f2f7472617669732d63692e6f72672f766173696c64616b6f762f706f7374636f64652d646f637472696e652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/vasildakov/postcode-doctrine)[![Coverage Status](https://camo.githubusercontent.com/65d31e81cea6284fa10688cf49dd5f2f2868cc4653c2d64a96a91140001ee609/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f766173696c64616b6f762f706f7374636f64652d646f637472696e652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/vasildakov/postcode-doctrine?branch=master)[![HHVM Status](https://camo.githubusercontent.com/ee582998951e560ffb16d6b707a6b1b3483c677aa5d76e3269cf59238f96ee78/687474703a2f2f6868766d2e683463632e64652f62616467652f766173696c64616b6f762f706f7374636f64652d646f637472696e652e7376673f7374796c653d666c6174)](http://hhvm.h4cc.de/package/vasildakov/postcode-doctrine)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/f379ef4c5dd00366e672efd959d3a82d2b411759742a0004ce4773153b6050b8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f766173696c64616b6f762f706f7374636f64652d646f637472696e652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/vasildakov/postcode-doctrine/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/11625626e28f08705ee4492c20f329ecac87dcf5f688589c733f6b76a103e71c/68747470733a2f2f706f7365722e707567782e6f72672f766173696c64616b6f762f706f7374636f64652d646f637472696e652f762f737461626c65)](https://packagist.org/packages/vasildakov/postcode-doctrine)[![Total Downloads](https://camo.githubusercontent.com/9776c92d1348dcf9aac6c0d3d0b3cb9ad99fbcba249642482622249b6f9a259c/68747470733a2f2f706f7365722e707567782e6f72672f766173696c64616b6f762f706f7374636f64652d646f637472696e652f646f776e6c6f616473)](https://packagist.org/packages/vasildakov/postcode-doctrine)[![License](https://camo.githubusercontent.com/0337c1ae61ecdf348b632c1e4d243b488ee7a952c2d3994d8d5a814451842edb/68747470733a2f2f706f7365722e707567782e6f72672f766173696c64616b6f762f706f7374636f64652d646f637472696e652f6c6963656e7365)](https://packagist.org/packages/vasildakov/postcode-doctrine)

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

[](#installation)

The preferred method of installation is via [Packagist](https://packagist.org/packages/vasildakov/postcode-doctrine) and [Composer](http://getcomposer.org/). Run the following command to install the package and add it as a requirement to your project's `composer.json`:

```
composer require vasildakov/postcode-doctrine
```

Configuration
-------------

[](#configuration)

To configure Doctrine to use vasildakov/postcode as a field type, you'll need to set up the following in your bootstrap:

```
\Doctrine\DBAL\Types\Type::addType('postcode', 'VasilDakov\Postcode\Doctrine\PostcodeType');
```

Then, in your models, you may annotate properties by setting the `@Column`type to `postcode`.

```
/**
 * @Entity
 * @Table(name="address")
 */
class Address
{
    /**
     * @var \VasilDakov\Postcode\Postcode
     * @Column(type="postcode")
     */
    protected $postcode;

    public function getPostcode()
    {
        return $this->postcode;
    }
}
```

Copyright and License
---------------------

[](#copyright-and-license)

The vasildakov/postcode-doctrine library is copyright © [Vasil Dakov](http://vasildakov.com/) and licensed for use under the MIT License (MIT). Please see \[LICENSE\]\[\] for more information.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~1 days

Total

5

Last Release

3555d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/97174920?v=4)[Vasil Dakov](/maintainers/vasildakov)[@vasildakov](https://github.com/vasildakov)

---

Top Contributors

[![vasildakov](https://avatars.githubusercontent.com/u/97174920?v=4)](https://github.com/vasildakov "vasildakov (23 commits)")

---

Tags

phptypedoctrinepostcodeuk

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/vasildakov-postcode-doctrine/health.svg)

```
[![Health](https://phpackages.com/badges/vasildakov-postcode-doctrine/health.svg)](https://phpackages.com/packages/vasildakov-postcode-doctrine)
```

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[api-platform/doctrine-orm

Doctrine ORM bridge

294.4M90](/packages/api-platform-doctrine-orm)

PHPackages © 2026

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