PHPackages                             mmouih/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. mmouih/entity-generator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mmouih/entity-generator
=======================

A tool designed to streamline the conversion of payloads (json, xml or yaml) into class entities

v1.0.2(2y ago)16MITPHP

Since Oct 20Pushed 2y ago1 watchersCompare

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

READMEChangelog (7)Dependencies (18)Versions (6)Used By (0)

Entity Generator
================

[](#entity-generator)

The **Entity Generator** is a tool designed to streamline the conversion of payloads into class entities for PHP applications running on PHP 7 and beyond. The generated entities adhere to the PSR-12 coding standards, ensuring a clean and consistent codebase.

This tool is particularly valuable for swiftly transforming payloads into Data Transfer Objects (DTOs), enhancing your PHP application's flexibility and efficiency.

Requirements
------------

[](#requirements)

- **PHP 8.2** or higher

Usage
-----

[](#usage)

To leverage the **Entity Generator**, use the following command:

### Using Json file

[](#using-json-file)

```
./phpgen generate [EntityName] [Payload] --f
```

### Using Json string

[](#using-json-string)

```
./phpgen generate [EntityName] [Json] "json"
```

Or simply

```
./phpgen generate [EntityName] [Json]
```

Example:

```
./phpgen generate User '{"id": 1, "label": "john"}'
```

### Using XML file

[](#using-xml-file)

```
./phpgen generate [EntityName] [filepath] "xml" -f
```

### Using XML string

[](#using-xml-string)

```
./phpgen generate [EntityName] [XML] "xml"
```

### Using Yaml file

[](#using-yaml-file)

```
./phpgen generate [EntityName] [filepath] "xml" -f
```

Configuration file
------------------

[](#configuration-file)

You can use customized entity generation options using a configuration a below,

```
#config.yaml.dist
entity.generator:
    output.dir: 'var/generated'
    namespace: 'Entity\Generated'
    property.phpdoc: true
    property.type: true # false before php7.4
```

```
./phpgen generate [EntityName] [filepath] "xml" -f -c path/to/config.yaml.dist
```

If config file is not configured, default options `(config.yaml.dist)` will be used.

###  Health Score

22

—

LowBetter than 23% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

Total

5

Last Release

919d ago

### Community

Maintainers

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

---

Top Contributors

[![mmouih](https://avatars.githubusercontent.com/u/8487016?v=4)](https://github.com/mmouih "mmouih (65 commits)")

---

Tags

phpdevgeneratorentitypayloaddtophpgen

###  Code Quality

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[symfony/maker-bundle

Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.

3.4k111.1M562](/packages/symfony-maker-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M385](/packages/shopware-core)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M647](/packages/sylius-sylius)

PHPackages © 2026

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