PHPackages                             phpsoftbox/data-casting - 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. phpsoftbox/data-casting

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

phpsoftbox/data-casting
=======================

Data casting component for the PhpSoftBox framework

015PHP

Since May 25Pushed 2w agoCompare

[ Source](https://github.com/phpsoftbox/data-casting)[ Packagist](https://packagist.org/packages/phpsoftbox/data-casting)[ RSS](/packages/phpsoftbox-data-casting/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

DataCasting
===========

[](#datacasting)

About
-----

[](#about)

`phpsoftbox/data-casting` — компонент приведения данных для PhpSoftBox.

Компонент предоставляет:

- `TypeCaster` и контракты handler-ов;
- набор базовых handler-ов (`int`, `float`, `string`, `json`, `datetime`, `uuid`, `enum`, `money`, `pg_array`, `phone`, `bool`);
- типизированные options и `TypeCastOptionsManager`.

Usage
-----

[](#usage)

```
use PhpSoftBox\DataCasting\DefaultTypeCasterFactory;
use PhpSoftBox\DataCasting\Options\TypeCastOptionsManager;

$caster = (new DefaultTypeCasterFactory())->create();
$options = new TypeCastOptionsManager();

$createdAt = $caster->castFrom('datetime', '2026-04-22T10:00:00+03:00', [
    ...$options->resolve('datetime', null),
]);
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance63

Regular maintenance activity

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

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/0279d150240c97d210034878b0467462246dc14d29b5618157ff6a8be49a50e3?d=identicon)[inspector-who](/maintainers/inspector-who)

---

Top Contributors

[![inspector-who](https://avatars.githubusercontent.com/u/6973963?v=4)](https://github.com/inspector-who "inspector-who (1 commits)")

### Embed Badge

![Health badge](/badges/phpsoftbox-data-casting/health.svg)

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

PHPackages © 2026

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