PHPackages                             tyam/fadoc - 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. [Validation &amp; Sanitization](/categories/validation)
4. /
5. tyam/fadoc

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

tyam/fadoc
==========

Form Array to Domain Object Converter/Validator

0.1.3(8y ago)072[2 issues](https://github.com/tyam/fadoc/issues)MITPHPPHP ^7.0

Since Jan 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/tyam/fadoc)[ Packagist](https://packagist.org/packages/tyam/fadoc)[ Docs](https://github.com/tyam/fadoc)[ RSS](/packages/tyam-fadoc/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

fadoc
=====

[](#fadoc)

fadoc automatically converts Form-Arrays and Domain-Objects to each other according to type declarations of methods.

Feature
-------

[](#feature)

- Conversion is done automatically according to method declarations of domain objects. No Form classes.
- You can define validation logics on domain objects.
- Supports factories, abstract classes/interfaces.

Basic Usage
-----------

[](#basic-usage)

```
class Point {
    private $x, y;
    public function __construct(int $x, int $y) {...}
}
class Circle {
    private $c, $r;
    public function __construct(Point $c, int $r) {...}
    public function intersects(Circle $another): bool {...}
}

$form = ['another' => [
           'c' => ['x' => '0', 'y' => '20'],
           'r' => '10'
        ]];
$c = new tyam\fadoc\Converter();
$condition = $c->objectize(['my\domain\Circle', 'intersects'], $form);
if ($condition->isFine()) {
    list($another) = $condition->get();
    $result = $myCircle->intersects($another);
} else {
    // validation error...
}
```

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

[](#installation)

```
$ composer require tyam/fadoc

```

fadoc depends on tyam/condition, which also is my library.

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

[](#documentation)

- [wiki (in Japanese)](https://github.com/tyam/fadoc/wiki/%E3%83%9B%E3%83%BC%E3%83%A0)
- [wiki (in English)](https://github.com/tyam/fadoc/wiki)

Lisence
-------

[](#lisence)

MIT

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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 ~44 days

Total

4

Last Release

2942d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1073251?v=4)[Tetsuo Yamada](/maintainers/tyam)[@tyam](https://github.com/tyam)

---

Top Contributors

[![tyam](https://avatars.githubusercontent.com/u/1073251?v=4)](https://github.com/tyam "tyam (14 commits)")

---

Tags

php-libraryphp7

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/tyam-fadoc/health.svg)

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M19.5k](/packages/laravel-framework)[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[symfony/cache

Provides extended PSR-6, PSR-16 (and tags) implementations

4.2k373.5M3.1k](/packages/symfony-cache)[symfony/mailer

Helps sending emails

1.6k409.1M1.3k](/packages/symfony-mailer)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[symfony/messenger

Helps applications send and receive messages to/from other applications or via message queues

1.1k132.9M1.4k](/packages/symfony-messenger)

PHPackages © 2026

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