PHPackages                             sergiors/taxonomy - 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. sergiors/taxonomy

ActiveLibrary

sergiors/taxonomy
=================

Embedded Annotations with JSON

659PHP

Since May 2Pushed 10y ago2 watchersCompare

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

READMEChangelogDependenciesVersions (1)Used By (0)

Taxonomy
--------

[](#taxonomy)

[![Build Status](https://camo.githubusercontent.com/cf62c324254f659062c8317f401d175725693268bc6241599c4e974005958224/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73657267696f72732f7461786f6e6f6d792f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sergiors/taxonomy/build-status/master)[![Code Coverage](https://camo.githubusercontent.com/49328ad39a9fbefdfe61e17c084d5ba1ecfd186002994fc94193602a7ae9b04a/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73657267696f72732f7461786f6e6f6d792f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sergiors/taxonomy/?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/6bbd33fdffc4c4c69ae9e0f248c3b82c9b8d5e0c5504d29c0c5b872647168ace/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73657267696f72732f7461786f6e6f6d792f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sergiors/taxonomy/?branch=master)

Taxonomy is an easier way implements Value Object and persist them in JSON format. Like Doctrine Embeddables

Motivation
----------

[](#motivation)

Install
-------

[](#install)

```
composer require sergiors/taxonomy "dev-master"
```

How to use
----------

[](#how-to-use)

```
use Sergiors\Taxonomy\Configuration\Annotation as Taxonomy;

class User
{
    /**
     * @Taxonomy\Embedded(
     *     class="Phone",
     *     column=@Taxonomy\Column(name="phone_metadata")
     * )
     */
    private $phone;

    public function getPhone()
    {
        return $this->phone;
    }

    public function setPhone(Phone $phone)
    {
        $this->phone = $phone;
    }
}

/**
 * @Taxonomy\Embeddable
 */
class Phone
{
    /**
     * @Taxonomy\Index
     */
    private $number;

    /**
     * @Taxonomy\Index(name="actived")
     */
    private $active;

    public function __construct()
    {
        $this->active = false;
    }

    public function getNumber()
    {
        return $this->number;
    }

    public function isActive()
    {
        return $this->active;
    }

    public function setNumber($number)
    {
        $this->number = preg_replace('/\D+/', '', $number);
    }
}
```

License
-------

[](#license)

MIT

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.2% 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/75b67763139f7a8c96302299f5a40a386d565829af3061bb55465c8808d54428?d=identicon)[sergiors](/maintainers/sergiors)

---

Top Contributors

[![sergiors](https://avatars.githubusercontent.com/u/2046276?v=4)](https://github.com/sergiors "sergiors (59 commits)")[![mrprompt](https://avatars.githubusercontent.com/u/166088?v=4)](https://github.com/mrprompt "mrprompt (3 commits)")

### Embed Badge

![Health badge](/badges/sergiors-taxonomy/health.svg)

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

PHPackages © 2026

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