santakadev/any-object 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

santakadev/any-object

Composer 安装命令:

composer require santakadev/any-object

包简介

PHP random object generator

README 文档

README

packagist license build

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

  • 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

Install Any Object via Composer as a development dependency:

composer require --dev santakadev/any-object

Usage

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

Fix certain properties while randomizing the rest:

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

License

This library is open-sourced under the MIT license.

统计信息

  • 总下载量: 18
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-05-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固