PHPackages                             kmuenkel/concept-factory - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. kmuenkel/concept-factory

ActiveLibrary[Testing &amp; Quality](/categories/testing)

kmuenkel/concept-factory
========================

Auto-generate dummy data with realistic relationships per Model-like config classes

v2.0.2(6y ago)0132MITPHPPHP ^7.1.3CI failing

Since Jan 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/kmuenkel/concept-factory)[ Packagist](https://packagist.org/packages/kmuenkel/concept-factory)[ RSS](/packages/kmuenkel-concept-factory/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (9)Dependencies (4)Versions (10)Used By (0)

The problem: Per the Scientific Method, PhpUnit tests need to be in control of the source data feeding the behavior being tested. And Model Factories, while handy, don't supply realistic relationships between records. You can make them, of course, by having them reference eachother in the foreign key fields. But then you risk infinite recursion if your database isn't normalized properly. And that still doesn't address the problem that one table doesn't necessarily represent one idea, necessitating multiple Model Factories for the same Model, and that starts to get a little messy.

i.e. a 'user' table might be a student, or it might be an admin. If it's a student, that means the user record must have particular values therein, and must have a particular relationship with a 'class' record, the 'class' record must have a corresponding 'school', and so-on. What if you could just run something like `php artisan concept:generate student`, and have all dependent-records of dependant-records generate for you on a recursive fashion?

Taking the example a bit further, if you have a lecture 'attendee' record, that means a 'student' with a related 'school' record. And there's a many-to-many relationship with a 'lecture' record... which *also* links to a 'school' record. So what if our dummy-data generator were smart enough to leverage the *same* school record for both?

That is the purpose of this package. To generate *mostly* random, *mostly* lorem ipsum dummy-data with **cascading realistic relationships** for the purposes of automated tests or local QA.

---

Similar to how Model classes encompass a database table, a Concept class encompasses a conceptual entity. They can be just as lightweight, and are structured in a similar manor, starting with a base Model name, a list of relationships that needed to be loaded with it, and the option to override the Model's relationship method with one of it's own, that could serve back a nested Concept object. It's the ability to replace a relationship with another Concept that allows this tool to become exponentially smarter the more it's leveraged.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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.

###  Release Activity

Cadence

Every ~0 days

Total

9

Last Release

2297d ago

Major Versions

v1.1.4 → v2.0.02020-01-26

PHP version history (2 changes)v1.0.0PHP &gt;=7.0.0

v1.1.0PHP ^7.1.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/86619ba927c0055375588f0c21d6d0d89be6a74e4a2cb98558062c852ebe5c66?d=identicon)[kmuenkel](/maintainers/kmuenkel)

---

Top Contributors

[![kmuenkel](https://avatars.githubusercontent.com/u/17931045?v=4)](https://github.com/kmuenkel "kmuenkel (39 commits)")

---

Tags

composerdata-generatorlaravelphpunittestinglaravelgeneratoreloquent

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kmuenkel-concept-factory/health.svg)

```
[![Health](https://phpackages.com/badges/kmuenkel-concept-factory/health.svg)](https://phpackages.com/packages/kmuenkel-concept-factory)
```

###  Alternatives

[imanghafoori/eloquent-mockery

Allows you to design your tests in an independent manner.

127636.4k2](/packages/imanghafoori-eloquent-mockery)[sti3bas/laravel-scout-array-driver

Array driver for Laravel Scout

971.5M3](/packages/sti3bas-laravel-scout-array-driver)[sofa/eloquent-testsuite

Helpers for fast and reliable UNIT tests for your Eloquent Models with PHPUnit

10104.7k](/packages/sofa-eloquent-testsuite)[socialblue/laravel-query-adviser

With Laravel Query Adviser you can get more insights into the SQL queries created by Eloquent models used in your app. It logs the queries used by your application and provides a helpful overview of the SQL queries. You can rerun the SQL query to analyze the database impact or copy the SQL query to your clipboard. The handy card view allows you to quickly point out the pain points of your application's SQL queries.

203.5k](/packages/socialblue-laravel-query-adviser)[srlabs/laravel-testing-utilities

Helper utilities for testing Laravel Applications

1011.9k](/packages/srlabs-laravel-testing-utilities)

PHPackages © 2026

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