cancio-labs/cpf-doctrine-type

A custom mapping type for CPF value object.

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/cancio-labs/cpf-doctrine-type

1.0.1 2024-07-24 17:01 UTC

This package is not auto-updated.

Last update: 2025-10-02 20:53:55 UTC


README

This tiny package contains a custom mapping type for CPF value object.

Requirements

  • PHP >= 7.4
  • Doctrine DBAL >= 3.0

Installation

composer require cancio-labs/cpf-doctrine-type

How to use it

First, copy the class name of the Cpf mapping type:

'CancioLabs\Doctrine\Type\Cpf\CpfType'

Then, register it in your application by following one of these guides:

Finally, use the 'cpf' mapping type inside your entity:

use CancioLabs\ValueObject\Cpf\Cpf;

#[ORM\Column(type: 'cpf')]
private ?Cpf $cpf = null;