Skip to content

santakadev/any-object

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Any Object

A PHP 8.1+ library to generate random objects of any class.

Any Object tries to build a random object with zero configuration (when possible).

Possible use cases:

  • Test doubles
  • Fixtures generation
  • Property based testing

Installation

composer require --dev santakadev/any-object

Usage

Generate a random object:

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

Fix some properties and use a random value for the rest

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

License

The MIT License (MIT). Please see License File for more information.

About

Random stub generator for PHP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages