bnder/bnder

Create entities on the fly.

Maintainers

Package info

github.com/PanosCodes/Bnder

pkg:composer/bnder/bnder

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

dev-master 2020-09-02 18:20 UTC

This package is auto-updated.

Last update: 2026-03-29 00:47:22 UTC


README

Build Status

🤖 Bnder

Bnder is inspired by the Laravel factories, it is meant to be a quick and clean way to create and persist and your Doctrine entities. It relies heavily on reflection class providing a fluent api.

Installation

composer require bnder/bnder

Example

$properties = [
    'user' => new User(),
    'email' => 'sample@mail.local',
];

Bnder::registerFactory(Factory::create(SampleEntity::class, $properties));

// This will create an array of 3 
$entities = Bnder::load(SampleEntity::class)->create(['email' => 'demo@mail.local'], 3);