PHPackages                             flexic/recaster - 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. flexic/recaster

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

flexic/recaster
===============

Package to recast php objects.

1.0.2(3y ago)0126MITPHPPHP ^8.1

Since Oct 16Pushed 3y ago1 watchersCompare

[ Source](https://github.com/flexicsystems/recaster)[ Packagist](https://packagist.org/packages/flexic/recaster)[ RSS](/packages/flexic-recaster/feed)WikiDiscussions main Synced today

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

📖 Recaster
----------

[](#-recaster)

This package allows to recast php objects to object of other class.

---

### Installation

[](#installation)

Run

```
composer require flexic/recaster
```

to install `flexic/recaster`.

---

### Cast to object of other class

[](#cast-to-object-of-other-class)

```
$recaster = new Flexic\Recaster\Recaster($inputObject);
$object = $recaster->toClass(TargetClass::class);
```

### Cast to array

[](#cast-to-array)

```
$recaster = new Flexic\Recaster\Recaster($inputObject);
$arrayOfObject = $recaster->toArray();
```

---

### License

[](#license)

This package is licensed using the GNU License.

Please have a look at [LICENSE.md](LICENSE.md).

---

[![Donate](https://camo.githubusercontent.com/b57c445af971e3e99c2d0ccdbf4fa7faa4358ba27fecc8f68459b30289f82eda/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617950616c2d626c75652e737667)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=Q98R2QXXMTUF6&source=url)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Total

3

Last Release

1355d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bee461f8192dd9177138458bcf9558257c572316ca6fed26b68d2f1e7efbb5be?d=identicon)[ThemePoint](/maintainers/ThemePoint)

---

Top Contributors

[![ThemePoint](https://avatars.githubusercontent.com/u/28843201?v=4)](https://github.com/ThemePoint "ThemePoint (8 commits)")

---

Tags

objectrecast

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/flexic-recaster/health.svg)

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

###  Alternatives

[myclabs/deep-copy

Create deep copies (clones) of your objects

8.9k894.3M227](/packages/myclabs-deep-copy)[symfony/property-access

Provides functions to read and write from/to an object or array using a simple string notation

2.8k317.3M3.2k](/packages/symfony-property-access)[cuyz/valinor

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

1.5k13.2M174](/packages/cuyz-valinor)[yzen.dev/plain-to-class

Class-transformer to transform your dataset into a structured object

163105.8k6](/packages/yzendev-plain-to-class)[kdyby/strict-objects

Simple trait to make your class strict, when calling or accessing undefined member (property or method).

321.7M18](/packages/kdyby-strict-objects)[jasny/dotkey

Dot notation access for objects and arrays

15223.8k7](/packages/jasny-dotkey)

PHPackages © 2026

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