PHPackages                             walnut/lib\_data - 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. walnut/lib\_data

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

walnut/lib\_data
================

010PHP

Since Sep 16Pushed 1y ago1 watchersCompare

[ Source](https://github.com/kapitancho/walnut-lib-data)[ Packagist](https://packagist.org/packages/walnut/lib_data)[ RSS](/packages/walnut-lib-data/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

OpenApi v.3 compatible data importer
====================================

[](#openapi-v3-compatible-data-importer)

Attribute based data importer and validator

Examples
--------

[](#examples)

### Book

[](#book)

```
final readonly class BookData {
    public function __construct(
        #[IntegerData(minimum: 1, maximum: 999999)]
        public int $numPages,

        #[StringData(minLength: 1, maxLength: 100)]
        public string $authorName,

        #[IntegerData(minimum: 1, maximum: 9999)]
        public int $issueYear,

        #[StringData(minLength: 1, maxLength: 100)]
        public string $publisherName,

        #[StringData(minLength: 1, maxLength: 30)]
        public string $language
    ) {}
}
```

```
$bookData = [
    'numPages' => 10,
    'authorName' => 'John Lock',
    'issueYear' => 2003,
    'publisherName' => "O'Really?",
    'language' => 'English'
];
$bookObject = $importer->import($bookData, BookData::class);
$importer->validate($bookObject); //ok
```

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/12d2910601119ce65c373b7e21ffc647154bde10c5ad0a0598ab1143aa851701?d=identicon)[kapitancho](/maintainers/kapitancho)

---

Top Contributors

[![kapitancho](https://avatars.githubusercontent.com/u/792682?v=4)](https://github.com/kapitancho "kapitancho (2 commits)")

### Embed Badge

![Health badge](/badges/walnut-lib-data/health.svg)

```
[![Health](https://phpackages.com/badges/walnut-lib-data/health.svg)](https://phpackages.com/packages/walnut-lib-data)
```

###  Alternatives

[fuwasegu/php-enum-util

The extension library for PHP native enum.

119.1k](/packages/fuwasegu-php-enum-util)

PHPackages © 2026

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