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(7y ago)072[2 issues](https://github.com/tyam/fadoc/issues)MITPHPPHP ^7.0

Since Jan 29Pushed 7y 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 3d 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 27% 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

2895d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/088385e1101130f72e0bfd971cc370065ef5b9f39e6f065adce167b5878b2a1a?d=identicon)[tyam](/maintainers/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

[aporat/store-receipt-validator

PHP receipt validator for Apple App Store and Amazon Appstore

6503.9M9](/packages/aporat-store-receipt-validator)[typo3/html-sanitizer

HTML sanitizer aiming to provide XSS-safe markup based on explicitly allowed tags, attributes and values.

279.6M2](/packages/typo3-html-sanitizer)[j-ben87/parsley-bundle

Convert Symfony constraints into data-attributes for client-side validation with Parsley.

1432.7k](/packages/j-ben87-parsley-bundle)

PHPackages © 2026

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