PHPackages                             arokettu/ip-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. arokettu/ip-address-doctrine

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

arokettu/ip-address-doctrine
============================

Doctrine support for arokettu/ip-address

1.0.3(1y ago)0150↓62.5%MITPHPPHP ^8.2

Since Oct 18Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/arokettu/ip-address-doctrine)[ Packagist](https://packagist.org/packages/arokettu/ip-address-doctrine)[ Docs](https://sandfox.dev/php/ip-address-doctrine.html)[ RSS](/packages/arokettu-ip-address-doctrine/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (9)Versions (5)Used By (0)

IP Address for Doctrine
=======================

[](#ip-address-for-doctrine)

[![Packagist](https://camo.githubusercontent.com/d0c532c8480324276375246ced492ce2b1469e1bf0633030494b7ff14314ee66/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61726f6b657474752f69702d616464726573732d646f637472696e652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/arokettu/ip-address-doctrine)[![PHP](https://camo.githubusercontent.com/d44a48dccd63510ab267e689e4bce4f9f8c660a08c3f78187940c7ab29152fc2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f61726f6b657474752f69702d616464726573732d646f637472696e652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/arokettu/ip-address-doctrine)[![License](https://camo.githubusercontent.com/609ff6864f648eb77d84f6292b9967a1ecf29c10723f3245e8d5144344f694fd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f61726f6b657474752f69702d616464726573732d646f637472696e652e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Gitlab CI](https://camo.githubusercontent.com/4a93d9e6e47dde6b2532f2dda78a66855bfef065b907f68e3f5d25ea22f9370a/68747470733a2f2f696d672e736869656c64732e696f2f6769746c61622f706970656c696e652f73616e64666f782f69702d616464726573732d646f637472696e652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://gitlab.com/sandfox/ip-address-doctrine/-/pipelines)[![Codecov](https://camo.githubusercontent.com/dc64f73fa07b1cd804cc40c8d89a554cfe49f393c04374dfe9f889123a1427d0/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f676c2f73616e64666f782f69702d616464726573732d646f637472696e653f7374796c653d666c61742d737175617265)](https://codecov.io/gl/sandfox/ip-address-doctrine/)

Doctrine support for [arokettu/ip-address](https://sandfox.dev/php/ip-address.html) with support for native types in MariaDB and PostgreSQL.

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

[](#installation)

```
composer require arokettu/ip-address-doctrine
```

Usage
-----

[](#usage)

Available types:

- Any version IP Address in text and binary form
- IPv4 Address in text and binary form
- IPv6 Address in text and binary form
- Any version IP Block in text and binary form
- IPv4 Block in text and binary form
- IPv6 Block in text and binary form
- Native PostgreSQL types: `inet`, `cidr`
- Native MariaDB types: `inet4`, `inet6`

Example:

```
