PHPackages                             davidkmenta/doctrine-simple-array-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. davidkmenta/doctrine-simple-array-types

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

davidkmenta/doctrine-simple-array-types
=======================================

Extended simple array types for Doctrine

1.1.0(7y ago)2191.1k—0.5%[1 issues](https://github.com/davidkmenta/doctrine-simple-array-types/issues)MITPHPPHP &gt;=7.1

Since Oct 17Pushed 7y ago1 watchersCompare

[ Source](https://github.com/davidkmenta/doctrine-simple-array-types)[ Packagist](https://packagist.org/packages/davidkmenta/doctrine-simple-array-types)[ Docs](https://github.com/davidkmenta/doctrine-simple-array-types)[ RSS](/packages/davidkmenta-doctrine-simple-array-types/feed)WikiDiscussions master Synced 1mo ago

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

Doctrine Simple Array Types
===========================

[](#doctrine-simple-array-types)

A [Doctrine field type](https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/types.html) for simple arrays of integers, floats and strings.

Description
-----------

[](#description)

These types mainly solve two common problems:

- *simple\_string\_array* solves the problem with strings containing a comma symbol. Such strings cannot be persisted in the *simple\_array* type provided by the Doctrine.
- *simple\_integer\_array* and *simple\_float\_array* extends the *simple\_array* type from the Doctrine. These types solve the problem when [a persisted integer or float is returned from the database as a string](https://www.doctrine-project.org/projects/doctrine-dbal/en/2.8/reference/types.html#simple-array).

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

[](#installation)

Run the following command:

```
composer require davidkmenta/doctrine-simple-array-types
```

Examples
--------

[](#examples)

To configure Doctrine to use this set of types, you'll need to set up the following in your bootstrap:

```
