PHPackages                             keboola/php-datatypes - 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. keboola/php-datatypes

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

keboola/php-datatypes
=====================

PHP datatypes for databases

9.0.0(4mo ago)1180.9k—7.7%1[4 issues](https://github.com/keboola/php-datatypes/issues)5MITPHPPHP ^8.2

Since Apr 13Pushed 1mo ago15 watchersCompare

[ Source](https://github.com/keboola/php-datatypes)[ Packagist](https://packagist.org/packages/keboola/php-datatypes)[ RSS](/packages/keboola-php-datatypes/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (210)Used By (5)

Keboola Datatypes
=================

[](#keboola-datatypes)

[![Build Status](https://camo.githubusercontent.com/1d3f0d71442064a230853ea1342bec8406764c554fe8c9ad5cc3a2c412872208/68747470733a2f2f7472617669732d63692e6f72672f6b65626f6f6c612f7068702d6461746174797065732e737667)](https://travis-ci.org/keboola/php-datatypes)[![Latest Stable Version](https://camo.githubusercontent.com/4df5f05f6d1400261d94737a2008734bb6379491706627a9b9a757745e19cd05/68747470733a2f2f706f7365722e707567782e6f72672f6b65626f6f6c612f7068702d6461746174797065732f76657273696f6e)](https://packagist.org/packages/keboola/php-datatypes)[![Code Climate](https://camo.githubusercontent.com/0af089769b584779814996ed1764176a2dd956a6f2146d57f9a0ee93a0e3c3fd/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6b65626f6f6c612f7068702d6461746174797065732f6261646765732f6770612e737667)](https://codeclimate.com/github/keboola/php-datatypes)[![Test Coverage](https://camo.githubusercontent.com/b53575f97daf9b8d80a3854b37d8dc28e9aaac353cd77b64c93f21819f81e262/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6b65626f6f6c612f7068702d6461746174797065732f6261646765732f636f7665726167652e737667)](https://codeclimate.com/github/keboola/php-datatypes/coverage)

Introduction
------------

[](#introduction)

This library is used for datatype definitions, validation and sql statement generation. Each type (Mysql, Redshift, Snowflake, GenericStorage) also provides a base type mapping that can be used to map types between different storage providers.

Base Types
----------

[](#base-types)

There are currently 7 base types: `String`, `Date`, `Timestamp`, `Integer`, `Numeric`, `Float`, and `Boolean`. Any type class that extends `Keboola\Datatype\Definition\Common` should provide a mapping for it's types to the above set. This will allow us to map data-types between storage providers.

Build
-----

[](#build)

```
git clone https://github.com/keboola/php-datatypes
cd php-datatypes
docker compose build
docker compose run --rm dev composer install

```

Tests Execution
---------------

[](#tests-execution)

Run tests with following command.

```
docker compose run --rm dev ./vendor/bin/phpunit

```

Coding Style
------------

[](#coding-style)

```
docker compose run --rm dev ./vendor/bin/phpcs --standard=psr2 --ignore=vendor -n .

```

License
-------

[](#license)

MIT licensed, see [LICENSE](./LICENSE) file.

###  Health Score

59

—

FairBetter than 99% of packages

Maintenance64

Regular maintenance activity

Popularity35

Limited adoption so far

Community29

Small or concentrated contributor base

Maturity95

Battle-tested with a long release history

 Bus Factor3

3 contributors hold 50%+ of commits

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 ~50 days

Recently: every ~67 days

Total

64

Last Release

134d ago

Major Versions

5.1.0 → 6.0.02022-05-18

6.4.0 → 7.0.02023-04-03

7.10.0 → 8.0.02025-04-11

7.8.1 → 8.2.02025-08-27

8.2.0 → 9.0.02026-01-04

PHP version history (5 changes)4.5.0PHP &gt;=5.6

5.0.0PHP &gt;=7.4

6.0.0PHP ^7.4|^8

7.0.0PHP ^8.1

8.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/101dbf2551a0709ddab522f97669f13a2c4cc2d0a1e8d009f3af6ba80accb1a9?d=identicon)[Keboola](/maintainers/Keboola)

---

Top Contributors

[![zajca](https://avatars.githubusercontent.com/u/180148?v=4)](https://github.com/zajca "zajca (84 commits)")[![jirkasemmler](https://avatars.githubusercontent.com/u/13363655?v=4)](https://github.com/jirkasemmler "jirkasemmler (65 commits)")[![pivnicek](https://avatars.githubusercontent.com/u/569139?v=4)](https://github.com/pivnicek "pivnicek (50 commits)")[![ondrajodas](https://avatars.githubusercontent.com/u/12143866?v=4)](https://github.com/ondrajodas "ondrajodas (49 commits)")[![ondrejhlavacek](https://avatars.githubusercontent.com/u/497675?v=4)](https://github.com/ondrejhlavacek "ondrejhlavacek (45 commits)")[![tomasfejfar](https://avatars.githubusercontent.com/u/642928?v=4)](https://github.com/tomasfejfar "tomasfejfar (17 commits)")[![romanbracinik](https://avatars.githubusercontent.com/u/6448364?v=4)](https://github.com/romanbracinik "romanbracinik (16 commits)")[![ErikZigo](https://avatars.githubusercontent.com/u/1726727?v=4)](https://github.com/ErikZigo "ErikZigo (14 commits)")[![vojtabiberle](https://avatars.githubusercontent.com/u/528942?v=4)](https://github.com/vojtabiberle "vojtabiberle (5 commits)")[![martinsifra](https://avatars.githubusercontent.com/u/1210906?v=4)](https://github.com/martinsifra "martinsifra (4 commits)")[![martinjunger](https://avatars.githubusercontent.com/u/84506613?v=4)](https://github.com/martinjunger "martinjunger (4 commits)")[![pepamartinec](https://avatars.githubusercontent.com/u/271753?v=4)](https://github.com/pepamartinec "pepamartinec (2 commits)")[![AdamVyborny](https://avatars.githubusercontent.com/u/27994036?v=4)](https://github.com/AdamVyborny "AdamVyborny (2 commits)")[![ujovlado](https://avatars.githubusercontent.com/u/419849?v=4)](https://github.com/ujovlado "ujovlado (2 commits)")

---

Tags

php

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/keboola-php-datatypes/health.svg)

```
[![Health](https://phpackages.com/badges/keboola-php-datatypes/health.svg)](https://phpackages.com/packages/keboola-php-datatypes)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90440.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)[wildside/userstamps

Laravel Userstamps provides an Eloquent trait which automatically maintains `created\_by` and `updated\_by` columns on your model, populated by the currently authenticated user in your application.

7511.7M13](/packages/wildside-userstamps)

PHPackages © 2026

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