PHPackages                             timitao/value-object - 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. timitao/value-object

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

timitao/value-object
====================

v0.3.3(4y ago)01.5k[1 PRs](https://github.com/timiTao/ValueObject/pulls)4BSD-3-ClausePHPPHP &gt;=8.0CI passing

Since Sep 15Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/timiTao/ValueObject)[ Packagist](https://packagist.org/packages/timitao/value-object)[ RSS](/packages/timitao-value-object/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (2)Versions (8)Used By (4)

[![License](https://camo.githubusercontent.com/f1d5484b2e58858474d5e33bd059ee6b8f8ba2477407cd7720c91ad15e6e0a7a/68747470733a2f2f706f7365722e707567782e6f72672f74696d6974616f2f76616c75652d6f626a6563742f6c6963656e73652e737667)](https://packagist.org/packages/timitao/value-object)[![Latest Stable Version](https://camo.githubusercontent.com/384d11d3bb689ac468032fdd348353a2b23a1f338c8b008781207ebaa681ff6f/68747470733a2f2f706f7365722e707567782e6f72672f74696d6974616f2f76616c75652d6f626a6563742f762f737461626c652e737667)](https://packagist.org/packages/timitao/value-object)[![Total Downloads](https://camo.githubusercontent.com/32be93ed111e8ca7b23a4fefa5848f643f619ed614dbd66566673919b1398189/68747470733a2f2f706f7365722e707567782e6f72672f74696d6974616f2f76616c75652d6f626a6563742f646f776e6c6f6164732e737667)](https://packagist.org/packages/timitao/value-object)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/5e2c1271b3a03e96be442b242b84af9f60881f5122215a11ecf8becf88176a96/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f74696d6954616f2f56616c75654f626a6563742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/timiTao/ValueObject/?branch=master)

Why
---

[](#why)

This library provides **typed Value Objects** in the spirit of Domain-Driven Design: immutable, compared by value and by type. It keeps **contracts** (interfaces) separate from **implementations**, offers both **Required** (non-null) and **Nullable** variants, and has **no framework dependency**—you can depend only on the contract package or use the default implementations.

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

[](#installation)

```
composer require timitao/value-object
```

Usage
-----

[](#usage)

Extend one of the standard value object classes and use `equals()` for type-safe value comparison (same concrete class and same value):

```
use TimiTao\ValueObject\Standard\Required\AbstractClass\ValueObject\StringValueObject;

final class Title extends StringValueObject {}

$a = new Title('Hello');
$b = new Title('Hello');
$c = new Title('World');

$a->equals($b); // true — same class, same value
$a->equals($c); // false — same class, different value
```

Architecture decision records
-----------------------------

[](#architecture-decision-records)

1. [Record architecture decisions](/doc/adr/0001-record-architecture-decisions.md)
2. [Strict code style](/doc/adr/0002-strict-code-style.md)
3. [Use of Beberlei/assert library](/doc/adr/0003-use-of-beberlei-assert-library.md)
4. [Split nullable and standard in 2 namespaces](/doc/adr/0004-split-nullable-and-standard-in-2-namespaces.md)
5. [Change facade for Beberlei extension uses](/doc/adr/0005-change-facade-for-beberlei-extension-uses.md)

Versioning
----------

[](#versioning)

Staring version `1.0.0`, will follow [Semantic Versioning v2.0.0](http://semver.org/spec/v2.0.0.html).

Contributors
------------

[](#contributors)

- Tomasz Kunicki [TimiTao](http://github.com/timiTao) \[lead developer\]

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance56

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~225 days

Recently: every ~155 days

Total

6

Last Release

1675d ago

PHP version history (2 changes)v0.1.0-stablePHP &gt;=7.1

v0.3.0PHP &gt;=8.0

### Community

Maintainers

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

---

Top Contributors

[![timiTao](https://avatars.githubusercontent.com/u/6087694?v=4)](https://github.com/timiTao "timiTao (15 commits)")

### Embed Badge

![Health badge](/badges/timitao-value-object/health.svg)

```
[![Health](https://phpackages.com/badges/timitao-value-object/health.svg)](https://phpackages.com/packages/timitao-value-object)
```

###  Alternatives

[knplabs/knp-disqus-bundle

6480.2k](/packages/knplabs-knp-disqus-bundle)[codexshaper/laravel-menu-builder

Laravel Drag and Drop Menu Builder

932.6k](/packages/codexshaper-laravel-menu-builder)[web200/magento-seo

Magento 2 Seo Module

1416.8k](/packages/web200-magento-seo)

PHPackages © 2026

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