PHPackages                             nolanos/laravel-doctrine-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. [Database &amp; ORM](/categories/database)
4. /
5. nolanos/laravel-doctrine-factory

ActiveLibrary[Database &amp; ORM](/categories/database)

nolanos/laravel-doctrine-factory
================================

Generate Typescript definitions for your Eloquent models

v3.1.0(2mo ago)191.0k—0.7%1[8 issues](https://github.com/nolanos/laravel-doctrine-factory/issues)[1 PRs](https://github.com/nolanos/laravel-doctrine-factory/pulls)MITPHPPHP ^8.2

Since Sep 12Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/nolanos/laravel-doctrine-factory)[ Packagist](https://packagist.org/packages/nolanos/laravel-doctrine-factory)[ Docs](https://github.com/nolanos/laravel-doctrine-factory)[ GitHub Sponsors](https://github.com/sponsors/ncphillips)[ RSS](/packages/nolanos-laravel-doctrine-factory/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (24)Used By (0)

Laravel Doctrine Factory
========================

[](#laravel-doctrine-factory)

Use [Eloquent Factories](https://laravel.com/docs/11.x/eloquent-factories) with your Doctrine Entities.

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

[](#installation)

Install via Composer:

```
composer require nolanos/laravel-doctrine-factory
```

Usage
-----

[](#usage)

Create Laravel factories and extend `Nolanos\LaravelDoctrineFactory\DoctrineFactory` instead of the usual `Illuminate\Database\Eloquent\Factories\Factory`.

`DoctrineFactory` subclasses the default `Factory` to override how it instantiates and saves the objects. Everything else works exactly the same.

Design Philosophy
-----------------

[](#design-philosophy)

### No Documentation Necessary

[](#no-documentation-necessary)

The goal of this package is to provide a drop-in replacement for Laravel's default factories that works with Doctrine entities. It should mirror the existing API so closely that you could read the Laravel documentation and use this package without any additional documentation (beyond setup).

### Explained Overrides

[](#explained-overrides)

Quite a few methods are overridden by this package to make Factories work with Doctrine entities. The doc blocks of all overridden methods will be explained next to the `@override` tag.

Development
===========

[](#development)

### Setup

[](#setup)

```
git clone git@github.com:nolanos/laravel-doctrine-factory.git

cd laravel-doctrine-factory

composer install
```

### Running Tests

[](#running-tests)

```
composer test
```

### Publishing new Versions

[](#publishing-new-versions)

To publish a new version of the package, you need to create a new tag and push it to the repository.

```
git tag vx.x.x
git push origin vx.x.x
```

Go to [Packagist](https://packagist.org/packages/nolanos/laravel-doctrine-factory) and click on "Update" to update the package.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance63

Regular maintenance activity

Popularity34

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 98.4% 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 ~26 days

Recently: every ~87 days

Total

21

Last Release

87d ago

Major Versions

v1.7.6 → v2.0.02025-08-20

v2.0.1 → v3.0.02026-02-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/be7d358fc7d7d1d0451e14aecccfd2f40bca26ad8374f174599b1e4df62e5124?d=identicon)[nolanos](/maintainers/nolanos)

---

Top Contributors

[![ncphillips](https://avatars.githubusercontent.com/u/824015?v=4)](https://github.com/ncphillips "ncphillips (62 commits)")[![trevorpe](https://avatars.githubusercontent.com/u/3450826?v=4)](https://github.com/trevorpe "trevorpe (1 commits)")

---

Tags

laraveleloquenttypescript

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/nolanos-laravel-doctrine-factory/health.svg)

```
[![Health](https://phpackages.com/badges/nolanos-laravel-doctrine-factory/health.svg)](https://phpackages.com/packages/nolanos-laravel-doctrine-factory)
```

###  Alternatives

[anourvalar/eloquent-serialize

Laravel Query Builder (Eloquent) serialization

11120.2M21](/packages/anourvalar-eloquent-serialize)[bavix/laravel-clickhouse

Eloquent model for ClickHouse

72214.1k2](/packages/bavix-laravel-clickhouse)[stayallive/laravel-eloquent-observable

Register Eloquent model event listeners just-in-time directly from the model.

2928.9k7](/packages/stayallive-laravel-eloquent-observable)[mozex/laravel-scout-bulk-actions

A Laravel Scout extension for bulk importing and flushing of all models.

1033.4k](/packages/mozex-laravel-scout-bulk-actions)

PHPackages © 2026

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