PHPackages                             modul-is/orm - 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. modul-is/orm

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

modul-is/orm
============

Lightweight hybrid ORM/Explorer

v2.3.0(1y ago)1118.1k↓29.5%[4 issues](https://github.com/modul-is/orm/issues)MITHTMLPHP ^8.4

Since Jan 8Pushed 1y ago2 watchersCompare

[ Source](https://github.com/modul-is/orm)[ Packagist](https://packagist.org/packages/modul-is/orm)[ Docs](https://github.com/modul-is/orm)[ RSS](/packages/modul-is-orm/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (32)Used By (0)

[![badge-version](https://camo.githubusercontent.com/e9a4ebbb27e83ba1787500e34f30b692eec4df47472e8566deb22e6c72de4269/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6d6f64756c2d69732f6f726d)](https://camo.githubusercontent.com/e9a4ebbb27e83ba1787500e34f30b692eec4df47472e8566deb22e6c72de4269/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6d6f64756c2d69732f6f726d)[![badge-licence](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)[![badge-stars](https://camo.githubusercontent.com/40fee4ae2df8fa8a8612102fc02751e81f60fc2de251515c294206fa5cff1c40/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6d6f64756c2d69732f6f726d)](https://camo.githubusercontent.com/40fee4ae2df8fa8a8612102fc02751e81f60fc2de251515c294206fa5cff1c40/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6d6f64756c2d69732f6f726d)[![badge-issues](https://camo.githubusercontent.com/68d7cd770fbd846a2927f39d7920fea6a3ea9cbbd0192d913f34dabd150ea6eb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6d6f64756c2d69732f6f726d)](https://camo.githubusercontent.com/68d7cd770fbd846a2927f39d7920fea6a3ea9cbbd0192d913f34dabd150ea6eb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6d6f64756c2d69732f6f726d)

Licence
=======

[](#licence)

This repository is an overhaul of [YetORM](https://github.com/uestla/YetORM) under MIT licence. Original fork [kravcik/core](https://github.com/kravcik/core) will not be maintained for Nette3. You can find the unfinished PR for YetORM and Nette 3 [here](https://github.com/uestla/YetORM/pull/23).

Abstract
========

[](#abstract)

This is a hybrid of a simple scalable database layer with ORM principles.

For usage and examples refer to [quickstart](quickstart.md).

Readonly
--------

[](#readonly)

The ReadonlyProperty attribute can be used for properties that should not be written into, for example columns with auto increment.

```
#[\ModulIS\Attribute\ReadonlyProperty]
public int $id;

```

Special types &amp; behavior
----------------------------

[](#special-types--behavior)

- **array** - stored in database as json
- **bool** - stored in database as int
- **\\Nette\\Utils\\DateTime** - save and load `\Nette\Utils\DateTime`

InputEntityNullableOutputint(1)int✓ || ✗int(1)int(0)int✓ || ✗int(0)string("0")int✓ || ✗Exceptionfloat(1.0)float✓ || ✗float(1.0)float(0.0)float✓ || ✗float(0.0)string("0.0")float✓ || ✗Exceptionstring("a")string✓ || ✗string("a")string("")string✓ || ✗string("")array(\["a" =&gt; "b"\])array✓ || ✗string("{"a":"b"}")array(\[\])array✓ || ✗string("\[\]")string("{"a":"b"}")array✓ || ✗Exceptionstring("\[\]")array✓ || ✗Exceptionbool(false)bool✓ || ✗bool(false)string("false")bool✓ || ✗ExceptionDateTime("2021-01-01 12:34:56")DateTime✓ || ✗string("2021-01-01 12:34:56")string("2021-01-01 12:34:56")DateTime✓ || ✗Exceptionint(0)float || string || array || bool || DateTime✓ || ✗Exceptionfloat(0.0)int || string || array || bool || DateTime✓ || ✗Exceptionstring("")int || float || array || bool || DateTime✓ || ✗Exceptionarray(\[\])int || float || string || bool || DateTime✓ || ✗Exceptionbool(false)int || float || string || array || DateTime✓ || ✗Exceptionnullint || float || string || array || bool || DateTime✓nullnullint || float || string || array || bool || DateTime✗ExceptionCustom types
------------

[](#custom-types)

You can also use custom types, you just have to create a class that extends `\ModulIS\Datatype\Datatype` and implements both of its static functions:

1. `input(string $name, $value)` - save logic (conversion into a database-compatible type)
2. `output($value)` - read logic (conversion back into the original type)

```
class File extends \ModulIS\Datatype\Datatype
{
	public static function input(string $name, $value): string
	{
		if($value instanceof \SplFileInfo)
		{
			$value = $value->getPathname();
		}
		else
		{
			throw new \ModulIS\Exception\InvalidArgumentException("Invalid type for column '{$name}' - Instance of '\SplFileInfo' expected, '" . get_debug_type($value) . "' given.");
		}

		return $value;
	}

	public static function output($value): self
	{
		$value = new self(new \SplFileInfo($value));

		return $value;
	}
}

```

Then you can use your type with a property just like all the usual types.

```
public \App\Datatype\File $file;

```

Just make sure the data is always wrapped in the specified class to avoid errors.

```
$entity->file = new \App\Datatype\File(new \SplFileInfo('../app/Datatype/File.php'));

bdump($entity->file); //App\Datatype\File(value: SplFileInfo(path: '../app/Datatype/File.php'));
bdump($entity->file->value->getFilename()); //'File.php'

```

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity86

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 59% 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

Every ~63 days

Recently: every ~46 days

Total

31

Last Release

426d ago

Major Versions

v0.0.7 → v1.0.02020-10-06

v1.1.1 → v2.0.02021-09-22

PHP version history (5 changes)v0.0.1PHP &gt;=7.1.0

v1.1.1PHP &gt;=7.1.0 &lt; 8.0.0

v2.0.0PHP ^8.0

v2.1.0PHP ^8.2

v2.3.0PHP ^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10499130?v=4)[Pavel Kravčík](/maintainers/kravcik)[@kravcik](https://github.com/kravcik)

---

Top Contributors

[![spulakk](https://avatars.githubusercontent.com/u/34043062?v=4)](https://github.com/spulakk "spulakk (59 commits)")[![vodictomas](https://avatars.githubusercontent.com/u/11019496?v=4)](https://github.com/vodictomas "vodictomas (30 commits)")[![kravcik](https://avatars.githubusercontent.com/u/10499130?v=4)](https://github.com/kravcik "kravcik (9 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![KrejciFili](https://avatars.githubusercontent.com/u/91294159?v=4)](https://github.com/KrejciFili "KrejciFili (1 commits)")

---

Tags

phpnettedatabaseorm

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/modul-is-orm/health.svg)

```
[![Health](https://phpackages.com/badges/modul-is-orm/health.svg)](https://phpackages.com/packages/modul-is-orm)
```

###  Alternatives

[nettrine/orm

Doctrine ORM for Nette Framework

581.9M37](/packages/nettrine-orm)[uestla/yetorm

Lightweight ORM for Nette\\Database

4936.4k](/packages/uestla-yetorm)[riverside/php-orm

PHP ORM micro-library and query builder

111.2k](/packages/riverside-php-orm)

PHPackages © 2026

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