PHPackages                             nikolaposa/cascader - 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. nikolaposa/cascader

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

nikolaposa/cascader
===================

Utility for creating objects in PHP from constructor parameters definitions.

1.3.0(5y ago)12237.5k—8.9%33MITPHPPHP ^7.2 || ^8.0

Since Jun 9Pushed 5y ago2 watchersCompare

[ Source](https://github.com/nikolaposa/cascader)[ Packagist](https://packagist.org/packages/nikolaposa/cascader)[ RSS](/packages/nikolaposa-cascader/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (2)Versions (6)Used By (3)

Cascader
========

[](#cascader)

[![Build Status](https://github.com/nikolaposa/cascader/workflows/Build/badge.svg?branch=master)](https://github.com/nikolaposa/cascader/actions)[![Code Quality](https://camo.githubusercontent.com/105e91f2dda5b3922dd2a3cead3feea55b4a1df460198488ee1597311f1749ea/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e696b6f6c61706f73612f63617363616465722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/nikolaposa/cascader)[![Code Coverage](https://camo.githubusercontent.com/90ad91bac3ca9eba219456cb2552ae43545fa805079be3a03ae964f493f09165/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e696b6f6c61706f73612f63617363616465722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/nikolaposa/cascader/code-structure)[![Latest Version](https://camo.githubusercontent.com/48c335391945487ec3a00853490d9489c948b42979ee27e7108b166aa665d500/68747470733a2f2f706f7365722e707567782e6f72672f6e696b6f6c61706f73612f63617363616465722f762f737461626c65)](https://packagist.org/packages/nikolaposa/cascader)[![PDS Skeleton](https://camo.githubusercontent.com/a8ce1f2a7b71f101b18fc0393ba5bf89b7a5b1f9d08a31b658ca0eab0064c0f6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7064732d736b656c65746f6e2d626c75652e737667)](https://github.com/php-pds/skeleton)

Cascader enables the creation of objects from array definitions that represent constructor parameters. Given the class name and creation options array, it will try to create a target object, also creating nested objects that may exist. Convenient as a factory for generic kind of objects.

Installation
------------

[](#installation)

The preferred method of installation is via [Composer](http://getcomposer.org/). Run the following command to install the latest version of a package and add it to your project's `composer.json`:

```
composer require nikolaposa/cascader
```

Usage
-----

[](#usage)

```
$cascader = new Cascader();

$object = $cascader->create(RootObject::class, [
    'name' => 'foo',
    'sub_object' => [
        'category' => 'bar',
        'count' => 10,
    ],
    'is_active' => true,
]);
```

See [more examples](examples).

Credits
-------

[](#credits)

- [Nikola Poša](https://github.com/nikolaposa)
- [All Contributors](../../contributors)

License
-------

[](#license)

Released under MIT License - see the [License File](LICENSE) for details.

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 81% 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 ~320 days

Total

5

Last Release

1983d ago

Major Versions

0.1.0 → 1.0.02017-06-11

PHP version history (2 changes)0.1.0PHP ^7.0

1.3.0PHP ^7.2 || ^8.0

### Community

Maintainers

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

---

Top Contributors

[![nikolaposa](https://avatars.githubusercontent.com/u/6012807?v=4)](https://github.com/nikolaposa "nikolaposa (34 commits)")[![alexpts](https://avatars.githubusercontent.com/u/1306916?v=4)](https://github.com/alexpts "alexpts (4 commits)")[![acelaya](https://avatars.githubusercontent.com/u/2719332?v=4)](https://github.com/acelaya "acelaya (2 commits)")[![samsonasik](https://avatars.githubusercontent.com/u/459648?v=4)](https://github.com/samsonasik "samsonasik (1 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (1 commits)")

---

Tags

cascadecascade-creationfactorygenericinstantiationfactoryinstantiategenericcascadecascade-creation

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/nikolaposa-cascader/health.svg)

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

###  Alternatives

[doctrine/instantiator

A small, lightweight utility to instantiate objects in PHP without invoking their constructors

11.0k853.3M335](/packages/doctrine-instantiator)[symfony/var-exporter

Provides tools to export, instantiate, hydrate, clone and lazy-load PHP objects

2.1k378.1M441](/packages/symfony-var-exporter)[aura/dispatcher

Creates objects from a factory and invokes methods using named parameters; also provides a trait for invoking closures and object methods with named parameters.

3695.0k3](/packages/aura-dispatcher)[illuminatech/array-factory

Allows DI aware object creation from array definition

2159.6k6](/packages/illuminatech-array-factory)

PHPackages © 2026

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