PHPackages                             matronator/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. [CLI &amp; Console](/categories/cli)
4. /
5. matronator/generator

Abandoned → [matronator/mtrgen](/?search=matronator%2Fmtrgen)Library[CLI &amp; Console](/categories/cli)

matronator/generator
====================

Automatically generate Entity and related files from the console.

v2.1.0(2y ago)2268[1 PRs](https://github.com/pineal-development/generator/pulls)MITPHPPHP &gt;=8.1

Since Jun 28Pushed 1y ago1 watchersCompare

[ Source](https://github.com/pineal-development/generator)[ Packagist](https://packagist.org/packages/matronator/generator)[ GitHub Sponsors](https://github.com/sponsors/matronator)[ Fund](https://ko-fi.com/matronator)[ RSS](/packages/matronator-generator/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (10)Versions (27)Used By (0)

Matronator/Generator
====================

[](#matronatorgenerator)

[![MTRGen Logo](.github/logo.png)](.github/logo.png)

Automatically generate Entity and related files from the console.

Instalation
-----------

[](#instalation)

```
composer require matronator/generator --dev

```

#### Troubleshooting

[](#troubleshooting)

If you get this error when trying to install:

```
matronator/generator dev-master requires composer-runtime-api ^2.2 -> found composer-runtime-api[2.1.0] but it does not match the constraint.

```

Run this command to update composer to the latest version:

```
composer self-update

```

If you can't or don't want to update composer, use version `"^1.0"` of this package as that doesn't depend on Composer runtime API 2.2.

Usage
-----

[](#usage)

You run the script from terminal using this command:

```
# Start interactive utility that walks you through steps to generate files
vendor/bin/mtrgen

# To list all available commands
vendor/bin/mtrgen list

# To see all generate commands
vendor/bin/mtrgen list generate

# To see usage of generate command
vendor/bin/mtrgen generate --help
vendor/bin/mtrgen gen -h

# Generate entity only
vendor/bin/mtrgen generate:entity EntityName
vendor/bin/mtrgen gen:e EntityName

# Generate entity, repo and facade
vendor/bin/mtrgen generate --type=database Name
vendor/bin/mtrgen gen -t database Name

```

#### Generating from config file

[](#generating-from-config-file)

You can specify if you want to generate the files from a config by setting the `--config` (or the shorthand `-c`) option to the path to your config file, like this:

```
vendor/bin/mtrgen generate --config=path/to/config/file.yml

```

You can find a sample config file in the `src/` folder under a name `config.sample.yml`. So if you installed this via Composer, it would be in `vendor/matronator/generator/src/config.sample.yml`.

Roadmap
-------

[](#roadmap)

Planned features for the project. Will be adding features as I think of them.

- Generate files
- Generate files from config
- Generate from templates
- Generate module files
    - BasePresenter
    - Presenter
    - Templates
- Add global config to customize project structure
    - Entity Traits to use
    - Paths to files and configs

License
-------

[](#license)

MIT License

Copyright (c) 2022 Matronator

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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 ~18 days

Recently: every ~40 days

Total

25

Last Release

1083d ago

Major Versions

v1.4.5 → v2.0.12022-10-12

PHP version history (2 changes)2.0.0PHP &gt;=8.1

1.0.0PHP &gt;=7.4

### Community

Maintainers

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

---

Top Contributors

[![matronator](https://avatars.githubusercontent.com/u/5470780?v=4)](https://github.com/matronator "matronator (55 commits)")

---

Tags

clicli-appcli-generatorcli-toolcode-generationcode-generatorgeneratorutilitygeneratorphp generatorfile generator

### Embed Badge

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

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

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

103574.3k69](/packages/friendsoftypo3-content-blocks)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19467.3M1.9k](/packages/drupal-core)[kimai/kimai

Kimai - Time Tracking

4.8k9.4k1](/packages/kimai-kimai)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6943.5M449](/packages/drupal-core-recommended)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M672](/packages/shopware-core)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

12017.1k](/packages/rcsofttech-audit-trail-bundle)

PHPackages © 2026

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