PHPackages                             brazanation/document-doctrine-types - 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. brazanation/document-doctrine-types

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

brazanation/document-doctrine-types
===================================

Library to provide Document as Doctrine Types

v0.1.0(8y ago)826MITPHPPHP ^5.6 || ^7.0

Since Aug 11Pushed 8y ago1 watchersCompare

[ Source](https://github.com/brazanation/php-documents-doctrine-types)[ Packagist](https://packagist.org/packages/brazanation/document-doctrine-types)[ RSS](/packages/brazanation-document-doctrine-types/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (5)Versions (2)Used By (0)

Doctrine Types for Brazilian Documents
======================================

[](#doctrine-types-for-brazilian-documents)

[![Build Status](https://camo.githubusercontent.com/2b8076a26756cd4baef1a6839cde509776b16e64fdba300b4e866f1a5935078b/68747470733a2f2f7472617669732d63692e6f72672f6272617a616e6174696f6e2f7068702d646f63756d656e74732d646f637472696e652d74797065732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/brazanation/php-documents-doctrine-types)[![StyleCI](https://camo.githubusercontent.com/8d418f46b4ef41f908eafc625b228ac8f982d5e3ff198d75d278910263785b9a/68747470733a2f2f7374796c6563692e696f2f7265706f732f39393835343939352f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/repos/99854995)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/3a4ef9383836b3f044cf6cef0dde07f86f07eee6af322e652714038991bb2fff/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6272617a616e6174696f6e2f7068702d646f63756d656e74732d646f637472696e652d74797065732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/brazanation/php-documents-doctrine-types/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/32a0bb613c09bd0ad168399c3dbb03e710107c92b7cd11e5d82bcd984cbbeddd/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6272617a616e6174696f6e2f7068702d646f63756d656e74732d646f637472696e652d74797065732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/brazanation/php-documents-doctrine-types/?branch=master)

### Installation

[](#installation)

```
composer require brazanation/document-doctrine-types ^0.1
```

### How to Use?

[](#how-to-use)

First of all, register the Document Types after Doctrine Connection.

```
// bootstrap.php

// ... other code
$connection = \Doctrine\DBAL\DriverManager::getConnection($conn, $config, new \Doctrine\Common\EventManager());

\Brazanation\Doctrine\TypeExtension::register($connection);

// ... more code
```

Define the entity's property as the document

```
/**
 * @Entity @Table(name="persons")
 */
class Person
{
    /**
     * @Id
     * @Column(type="cpf")
     * @var \Brazanation\Documents\Cpf
     */
    private $cpf;

    public function __construct(\Brazanation\Documents\Cpf $cpf)
    {
        $this->cpf = $cpf;
    }

    public function getCpf()
    {
        return $this->cpf;
    }
}
```

### Available Types

[](#available-types)

Type NameDescriptioncnhNational Driving LicensecnpjCompany Identification or National Register of Legal EntitiescnsNational Health CardcpfRegistration of individuals or Tax IdentificationpispasepSocial Integration Program and Training Program of the Heritage of Public ServantrenavamNational Registry of Motor Vehicles

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.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

Unknown

Total

1

Last Release

3244d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/966337?v=4)[Antonio Spinelli](/maintainers/tonicospinelli)[@tonicospinelli](https://github.com/tonicospinelli)

---

Top Contributors

[![tonicospinelli](https://avatars.githubusercontent.com/u/966337?v=4)](https://github.com/tonicospinelli "tonicospinelli (12 commits)")[![carusogabriel](https://avatars.githubusercontent.com/u/16328050?v=4)](https://github.com/carusogabriel "carusogabriel (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/brazanation-document-doctrine-types/health.svg)

```
[![Health](https://phpackages.com/badges/brazanation-document-doctrine-types/health.svg)](https://phpackages.com/packages/brazanation-document-doctrine-types)
```

###  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.

4535.7M4](/packages/martin-georgiev-postgresql-for-doctrine)[flow-php/doctrine-dbal-bulk

Bulk inserts and updates for Doctrine DBAL

14361.1k3](/packages/flow-php-doctrine-dbal-bulk)[mahocommerce/maho

Free and open source ecommerce platform, created in 2024 on the M1 platform, PHP 8.3+

1384.8k32](/packages/mahocommerce-maho)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1615.6k12](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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