PHPackages                             imponeer/properties - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. imponeer/properties

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

imponeer/properties
===================

Add a possibility to define class variables with strict data type behaviors

20[1 issues](https://github.com/imponeer/properties/issues)PHPCI passing

Since May 20Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/imponeer/properties)[ Packagist](https://packagist.org/packages/imponeer/properties)[ RSS](/packages/imponeer-properties/feed)WikiDiscussions main Synced 3d ago

READMEChangelogDependenciesVersions (5)Used By (0)

[![License](https://camo.githubusercontent.com/48e8bd7758f5b1934750f2fcfb3318cbb1e98c74da223bfc10381e3b58b175bf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f696d706f6e6565722f70726f706572746965732e7376673f6d61784167653d32353932303030)](LICENSE.md) [![GitHub release](https://camo.githubusercontent.com/36de7f81ad4c025e503f6e7f4981f721f2bb23a57bff436f5c22e69e76e091c9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f696d706f6e6565722f70726f706572746965732e7376673f6d61784167653d32353932303030)](https://github.com/imponeer/properties/releases) [![Tests](https://github.com/imponeer/properties/actions/workflows/on-pull-request.yml/badge.svg?branch=main)](https://github.com/imponeer/properties/actions/workflows/on-pull-request.yml) [![Packagist](https://camo.githubusercontent.com/99dc9fe256e11861674bfcf002277c7a39cc21af4bde3681c41b4174ea3fd560/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646d2f696d706f6e6565722f70726f706572746965732e737667)](https://packagist.org/packages/imponeer/properties)

Properties
==========

[](#properties)

PHP library that lets you define strict, validated class variables (with change tracking and serialization helpers) in one place and reuse them across your own domain classes.

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

[](#installation)

`composer require imponeer/properties`

Usage
-----

[](#usage)

Quick start:

1. Extend `Imponeer\Properties\PropertiesSupport` (or implement `PropertiesInterface` yourself).
2. Define each property in the constructor with `initVar()` using a `DataType` enum (or the legacy `DTYPE_*` constants available on `PropertiesInterface`).
3. Use the generated magic accessors or helper methods like `toArray()`/`assignVars()` as you would with normal public properties.

```
use DateTimeImmutable;
use Imponeer\Properties\Enum\DataType;
use Imponeer\Properties\PropertiesSupport;

final class Article extends PropertiesSupport
{
    public function __construct()
    {
        $this->initVar('id', DataType::INTEGER, null, true);
        $this->initVar('title', DataType::STRING, 'Untitled', true, ['maxlength' => 150]);
        $this->initVar('published_at', DataType::DATETIME, null, false);
    }
}

$article = new Article();
$article->title = 'Hello world';
$article->published_at = new DateTimeImmutable();

var_dump($article->toArray()); // Strictly typed values, ready to persist or render
```

How to contribute?
------------------

[](#how-to-contribute)

If you want to add some functionality or fix bugs, you can fork, change and create pull request. If you are new to Git or GitHub, start with the [GitHub Skills “Introduction to GitHub” course](https://skills.github.com/).

If you found any bug or have some questions, use [issues tab](https://github.com/imponeer/properties/issues) and write there your questions.

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance50

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/dba53e399a507d1f60626164c8b1e340a5cc0dc4f0637f4c6aaff8fc239fdaee?d=identicon)[fiammybe](/maintainers/fiammybe)

![](https://avatars.githubusercontent.com/u/342641?v=4)[Raimondas Rimkevičius](/maintainers/MekDrop)[@MekDrop](https://github.com/MekDrop)

![](https://avatars.githubusercontent.com/u/2429107?v=4)[Steve Kenow](/maintainers/skenow)[@skenow](https://github.com/skenow)

---

Top Contributors

[![MekDrop](https://avatars.githubusercontent.com/u/342641?v=4)](https://github.com/MekDrop "MekDrop (213 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (28 commits)")[![Codex](https://avatars.githubusercontent.com/in/2248422?v=4)](https://github.com/Codex "Codex (27 commits)")[![Claude](https://avatars.githubusercontent.com/in/2246796?v=4)](https://github.com/Claude "Claude (11 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (3 commits)")[![fiammybe](https://avatars.githubusercontent.com/u/3736946?v=4)](https://github.com/fiammybe "fiammybe (2 commits)")[![mend-bolt-for-github[bot]](https://avatars.githubusercontent.com/in/16809?v=4)](https://github.com/mend-bolt-for-github[bot] "mend-bolt-for-github[bot] (1 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

---

Tags

php-libraryproperties

### Embed Badge

![Health badge](/badges/imponeer-properties/health.svg)

```
[![Health](https://phpackages.com/badges/imponeer-properties/health.svg)](https://phpackages.com/packages/imponeer-properties)
```

PHPackages © 2026

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