PHPackages                             igorbrites/entity-generator - 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. igorbrites/entity-generator

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

igorbrites/entity-generator
===========================

Entity Generator for PHP based on database

162[1 issues](https://github.com/igorbrites/entity-generator-php/issues)PHP

Since Nov 5Pushed 10y agoCompare

[ Source](https://github.com/igorbrites/entity-generator-php)[ Packagist](https://packagist.org/packages/igorbrites/entity-generator)[ RSS](/packages/igorbrites-entity-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Entity Generator for PHP
========================

[](#entity-generator-for-php)

### Generates entities based on database

[](#generates-entities-based-on-database)

To use it, install via composer:

```
composer global require igorbrites/entity-generator=dev-master

```

Edit the `config.json` with the options below:

- `namespace`: The namespace of the entities. Default: `null` (e.g.: `My\\Awesome\\Namespace`);
- `output-dir`: (Required!) The output folder (e.g.: `/home/ubuntu/entities`);
- `date-type`: The date fields type. Default `\DateTime` (e.g.: `\\Carbon\\Carbon`);
- `extends`: The class that the entities extends. Default `null` (e.g.: `\\My\\Awesome\\Class`);
- `fk-pattern`: The pattern that fit your FKs. Default `([a-z_]+)_id` (e.g.: `id([a-z_]+)`);
- `database`: (Required!) The database connection parameters:
    - `schema`: The database name. Default `database`;
    - `host`: The database host. Default `127.0.0.1`;
    - `user`: The database user. Default `root`;
    - `password`: The database password. Default ``;

Then, run the command:

```
entity-generator

```

It will generate two folders on the specified output folder, `classes` and `tests`, with your entities.

###  Health Score

16

—

LowBetter than 5% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

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

---

Top Contributors

[![igorbrites](https://avatars.githubusercontent.com/u/1479917?v=4)](https://github.com/igorbrites "igorbrites (14 commits)")

### Embed Badge

![Health badge](/badges/igorbrites-entity-generator/health.svg)

```
[![Health](https://phpackages.com/badges/igorbrites-entity-generator/health.svg)](https://phpackages.com/packages/igorbrites-entity-generator)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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