# CuyZ/Valinor

Dependency free PHP library that helps to map any input into a strongly-typed structure.

Repository: https://github.com/CuyZ/Valinor
Canonical: https://ross.abutalabs.com/products/valinor
Homepage: https://valinor-php.dev
Language: PHP
License: MIT
License Family: permissive
Last push: 2026-08-11T07:31:33+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 97, longevity 100
- inputs: {"age_days": 1739, "days_push": 22, "days_rel": 22, "gap_med": 27.5, "n_releases_24m": 23}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1526, forks 92 (observed 2026-08-28T04:04:58.457003+00:00)

## What it is
Valinor is a dependency-free PHP library that maps raw inputs like JSON or arrays into strongly-typed PHP objects, validating values and producing human-readable error messages. It also provides normalization to convert objects back into data formats while preserving structure.

## Use cases
- map  payloads into typed php objects
- hydrate dtos from arrays or
- validate api request bodies against php types
- convert raw input into readonly value objects
- normalize objects to  or csv
- handle advanced phpstan/psalm types like shaped arrays and generics

## When to choose
- you want strongly-typed objects constructed from untrusted input with validation
- you need precise, human-readable mapping error messages
- you use advanced PHP types (generics, shaped arrays, ranges) in your models

## When to avoid
- you need a full ORM or database persistence layer
- you only need simple _encode/_decode without type mapping
- your project is not PHP

## Facets
- artifact type: library
- maturity: active
- function: serialization, form-handling
- domain: developer-tools, web-development, apis
- platform: php
- tags: data-mapper, typed-objects, -mapping, dto, hydration, normalization

## Member repositories
- CuyZ/Valinor (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:58.457003+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:31:35.472878+00:00, confidence not recorded.
  - readme: https://github.com/CuyZ/Valinor (fetched 2026-08-28T04:04:58.457003+00:00, sha 2ce4e697c908)
  - homepage: https://valinor-php.dev (fetched 2026-08-29T11:34:08.051447+00:00, sha 36c6c3c2e4f9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
