PHPackages                             dantleech/decorator-generator - 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. dantleech/decorator-generator

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

dantleech/decorator-generator
=============================

Generate decorators for PHP classes

0114PHP

Since May 11Pushed 11y ago1 watchersCompare

[ Source](https://github.com/dantleech/DecoratorGenerator)[ Packagist](https://packagist.org/packages/dantleech/decorator-generator)[ RSS](/packages/dantleech-decorator-generator/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Decorator Generator
===================

[](#decorator-generator)

This is a small library for generating decorators for objects. Its only purpose is to provide the object with a new class name whilst maintaining its class type.

```
$object = new \stdClass;

$factory = new DecoratorFactory('/path/to/cache', new DecoratorGenerator());
$decorator = $factory->generate($object, 'NewClass\Fqn\ClassName');
$decorated = new \NewClass\Fqn\ClassName();
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/24ec7d5d6b7ea54007be5d7b4f43800381cc1e22929f7d2276fba30e497fdfa6?d=identicon)[dantleech](/maintainers/dantleech)

---

Top Contributors

[![dantleech](https://avatars.githubusercontent.com/u/530801?v=4)](https://github.com/dantleech "dantleech (3 commits)")

### Embed Badge

![Health badge](/badges/dantleech-decorator-generator/health.svg)

```
[![Health](https://phpackages.com/badges/dantleech-decorator-generator/health.svg)](https://phpackages.com/packages/dantleech-decorator-generator)
```

###  Alternatives

[swekaj/cron-expression-generator

Generate valid cron expressions.

1169.5k1](/packages/swekaj-cron-expression-generator)[symfony/deepclone

Export any serializable PHP values as pure arrays - accelerator for Symfony's DeepCloner

141.1k](/packages/symfony-deepclone)

PHPackages © 2026

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