PHPackages                             santakadev/any-object - 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. santakadev/any-object

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

santakadev/any-object
=====================

PHP random object generator

118[1 issues](https://github.com/santakadev/any-object/issues)PHP

Since Oct 27Pushed 1y ago2 watchersCompare

[ Source](https://github.com/santakadev/any-object)[ Packagist](https://packagist.org/packages/santakadev/any-object)[ RSS](/packages/santakadev-any-object/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Any Object
==========

[](#any-object)

[![packagist](https://camo.githubusercontent.com/9f3bc3e14224ddfa35de020ea61ba3a770c394a4b499c80543c004d1efaf9ca8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73616e74616b616465762f616e792d6f626a6563742e7376673f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/9f3bc3e14224ddfa35de020ea61ba3a770c394a4b499c80543c004d1efaf9ca8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73616e74616b616465762f616e792d6f626a6563742e7376673f7374796c653d666c61742d737175617265)[![license](https://camo.githubusercontent.com/2ff5cbfc01ec2f747c3020ae6230ecd78e8f5b112b8c0a9b709f5cd1e1c37b03/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f73616e74616b616465762f616e792d6f626a656374)](https://camo.githubusercontent.com/2ff5cbfc01ec2f747c3020ae6230ecd78e8f5b112b8c0a9b709f5cd1e1c37b03/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f73616e74616b616465762f616e792d6f626a656374)[![build](https://github.com/santakadev/any-object/actions/workflows/ci.yaml/badge.svg)](https://github.com/santakadev/any-object/actions/workflows/ci.yaml/badge.svg)

Warning

This library is under active development and will continue to evolve until version 1.0. Features and API may change. Use in production at your own risk.

**Any Object** generates random instances of any class with zero configuration. Objects can be generated on-the-fly or with the codegen feature, which allows you to create and maintain Object Mothers and Object Builders automatically.

Features
--------

[](#features)

- **Zero Configuration:** Any Object attempts to create objects with minimal setup.
- **Flexible Object Creation:** Supports setting specific properties while randomizing the rest.
- **Code Generation:** Automatically builds and maintains Object Mothers and Builders for test purposes.

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

[](#installation)

Install Any Object via [Composer](https://getcomposer.org/) as a development dependency:

```
composer require --dev santakadev/any-object
```

Usage
-----

[](#usage)

### Generate a random object

[](#generate-a-random-object)

You can quickly generate a random object of a given class:

```
$any = new AnyObject();
$object = $any->of(Product::class);
```

### Customize properties

[](#customize-properties)

Fix certain properties while randomizing the rest:

```
$any = new AnyObject();
$object = $any->of(Product::class, with: ['name' => 'My Product']);
```

License
-------

[](#license)

This library is open-sourced under the [MIT license](LICENSE).

###  Health Score

12

—

LowBetter than 0% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity18

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/2110deaba5073168b64cfb123bced3da5cdad6d2c7ffa055cda02a090cce2c31?d=identicon)[santaka](/maintainers/santaka)

---

Top Contributors

[![santakadev](https://avatars.githubusercontent.com/u/3189335?v=4)](https://github.com/santakadev "santakadev (222 commits)")

### Embed Badge

![Health badge](/badges/santakadev-any-object/health.svg)

```
[![Health](https://phpackages.com/badges/santakadev-any-object/health.svg)](https://phpackages.com/packages/santakadev-any-object)
```

###  Alternatives

[yii2mod/yii2-markdown

Markdown Widget for Yii2

1347.7k5](/packages/yii2mod-yii2-markdown)[splitbrain/php-ringicon

A indenticon/glyphicon like avatar generator

1613.3k1](/packages/splitbrain-php-ringicon)[willywes/agora-sdk-php

Agora.io SDK PHP

1023.2k2](/packages/willywes-agora-sdk-php)

PHPackages © 2026

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