PHPackages                             myks92/php-value-objects - 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. myks92/php-value-objects

ActiveLibrary

myks92/php-value-objects
========================

A PHP library Value Object

1.1.0(5y ago)416↓100%MITPHPPHP ^7.4CI passing

Since Apr 11Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/Myks92/php-value-objects)[ Packagist](https://packagist.org/packages/myks92/php-value-objects)[ RSS](/packages/myks92-php-value-objects/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

PHP Value Objects
=================

[](#php-value-objects)

[![Packagist Version](https://camo.githubusercontent.com/7e41d97e644d4e374feabeacca3cebb0f8c7952a419bcc0bcbb4e04cf66b4790/68747470733a2f2f706f7365722e707567782e6f72672f6d796b7339322f7068702d76616c75652d6f626a656374732f762f737461626c652e706e67)](https://packagist.org/packages/myks92/php-value-objects) [![Total Downloads](https://camo.githubusercontent.com/9a9fc366673b61c379a41d7ec8d52e2229f86a150d0eaed345a8b69f1b083a36/68747470733a2f2f706f7365722e707567782e6f72672f6d796b7339322f7068702d76616c75652d6f626a656374732f762f756e737461626c652e706e67)](https://packagist.org/packages/myks92/php-value-objects) [![Software License](https://camo.githubusercontent.com/1d2954d18857df1a9b2a38251b2ce7552313331fdeb5acc0081d83a16fd43cd6/68747470733a2f2f706f7365722e707567782e6f72672f6d796b7339322f7068702d76616c75652d6f626a656374732f6c6963656e7365)](LICENSE.md)[![PHP Version](https://camo.githubusercontent.com/b3f73317adfe1f97ea6b093b73d5c0a96a0cc5b77629cd40828b916f71bcf5af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f4d796b7339322f7068702d76616c75652d6f626a656374732e7376673f7374796c653d666c61742d737175617265)](https://php.net)[![Total Downloads](https://camo.githubusercontent.com/ec0ca53562c143b25fe0844d02cbb9d39fd4b10df0ceb07e8c682722cde4cd23/68747470733a2f2f706f7365722e707567782e6f72672f6d796b7339322f7068702d76616c75652d6f626a656374732f646f776e6c6f616473)](https://packagist.org/packages/myks92/php-value-objects)[![composer.lock](https://camo.githubusercontent.com/03daf10601590d9f137bd50bb4c32dfc428b816abe0c9151e194a73c3593ea40/68747470733a2f2f706f7365722e707567782e6f72672f6d796b7339322f7068702d76616c75652d6f626a656374732f636f6d706f7365726c6f636b)](https://packagist.org/packages/myks92/php-value-objects)

BranchTravismaster[![Build Status](https://camo.githubusercontent.com/8ed1576c323470e15897bae1f29fdfda2a5f36ba99c198c636f610b529214efe/68747470733a2f2f7472617669732d63692e6f72672f4d796b7339322f7068702d76616c75652d6f626a656374732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Myks92/php-value-objects)A set of PHP Value Objects to manage simple and composite values.

What are Value Objects

Value Objects are PHP [`objects`](http://php.net/manual/en/language.types.object.php) that represent and manage simple or complex values. Once set, the value object cannot be modified without changing its identity.

Simple value objects represent a simple value, like an email. Complex value objects represent complex values, that, in order to really represent a value, need more than one value, like a price that needs an amount and a currency to be understandable and have a sense.

PHP supports several value object e.g.: the [`DateTime`](https://www.php.net/manual/en/class.datetime.php) object and [`DateTimeImmutable`](https://www.php.net/manual/ru/class.datetimeimmutable.php) object.

This library gives support for other kind of values.

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

[](#installation)

To install, use [composer](https://getcomposer.org):

```
composer require myks92/php-value-objects

```

Documentation
-------------

[](#documentation)

All use instructions are located in [documentation](https://github.com/Myks92/php-value-objects/blob/master/docs/readme.md).

Testing
-------

[](#testing)

```
composer test

```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](https://github.com/Myks92/php-value-objects/blob/master/CHANGELOG.md) for more information on what has changed recently.

License
-------

[](#license)

The MIT License (MIT). Please see [LICENSE](https://github.com/Myks92/php-value-objects/blob/master/LICENSE.md) for more information.

###  Health Score

35

—

LowBetter than 80% of packages

Maintenance53

Moderate activity, may be stable

Popularity12

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

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

###  Release Activity

Cadence

Every ~109 days

Total

2

Last Release

2119d ago

### Community

Maintainers

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

---

Top Contributors

[![Myks92](https://avatars.githubusercontent.com/u/31630905?v=4)](https://github.com/Myks92 "Myks92 (67 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

ddddomain-driven-designphpphp-value-objectsphp74value-objectvalue-objectsValue ObjectvoarchitectureDomain Driven Design

### Embed Badge

![Health badge](/badges/myks92-php-value-objects/health.svg)

```
[![Health](https://phpackages.com/badges/myks92-php-value-objects/health.svg)](https://phpackages.com/packages/myks92-php-value-objects)
```

###  Alternatives

[moneyphp/money

PHP implementation of Fowler's Money pattern

4.8k82.5M422](/packages/moneyphp-money)[ytake/valueobjects

A PHP library/collection of classes aimed to help developers using and undestanding immutable objects.(temporary package)

6086.2k](/packages/ytake-valueobjects)[phpmentors/domain-kata

Kata for domain models

73426.9k9](/packages/phpmentors-domain-kata)[adsmurai/currency

A small library to handle currencies and money values

4542.1k](/packages/adsmurai-currency)

PHPackages © 2026

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