PHPackages                             mpmontanez/json-schema-to-php-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. mpmontanez/json-schema-to-php-generator

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

mpmontanez/json-schema-to-php-generator
=======================================

Code generation tool for converting JSON schema documents to simple PHP classes.

0.0.11(9y ago)52513PHP

Since Jan 30Pushed 9y ago1 watchersCompare

[ Source](https://github.com/mpmontanez/json-schema-to-php-generator)[ Packagist](https://packagist.org/packages/mpmontanez/json-schema-to-php-generator)[ RSS](/packages/mpmontanez-json-schema-to-php-generator/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

JSON Schema to PHP Generator
============================

[](#json-schema-to-php-generator)

Objective: build a code generation tool that will convert JSON spec files into simple PHP classes. Java inspiration:

Demo
----

[](#demo)

Generate sample generated-code by executing the following:

```
php cli/generate.php

```

The schema source directory will be the 'json-schemas' folder and the code will be placed in the 'generated-code' folder.

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

[](#installation)

```
{
    "require": {
        "mpmontanez/json-schema-to-php-generator": "dev-master"
    }
}

```

Usage
-----

[](#usage)

To generate PHP code from a set of JSON schema files, provide the following paramters to the Generator: the base working directory, the JSON schema source folder name, the generated code destination folder name, and the base namespace to use for the generated PHP classes.

*BEWARE* The initial contents of the destination folder will be deleted when calling generate().

```
$generator = new \mpmontanez\JsonSchemaToPhpGenerator\Generator(
    __DIR__ . '/../', 'json-schemas', 'generated-code', 'Sample\\GeneratedCode\\');
$generator->generate();

```

###  Health Score

28

—

LowBetter than 51% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87.5% 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

2

Last Release

3483d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2363592?v=4)[Matthew Montañez](/maintainers/mpmontanez)[@mpmontanez](https://github.com/mpmontanez)

---

Top Contributors

[![MatthewMontanez](https://avatars.githubusercontent.com/u/8420913?v=4)](https://github.com/MatthewMontanez "MatthewMontanez (14 commits)")[![mpmontanez](https://avatars.githubusercontent.com/u/2363592?v=4)](https://github.com/mpmontanez "mpmontanez (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mpmontanez-json-schema-to-php-generator/health.svg)

```
[![Health](https://phpackages.com/badges/mpmontanez-json-schema-to-php-generator/health.svg)](https://phpackages.com/packages/mpmontanez-json-schema-to-php-generator)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.9k556.2M21.3k](/packages/laravel-framework)[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k20](/packages/tempest-framework)[brianhenryie/strauss

Prefixes dependencies namespaces so they are unique to your plugin

192484.7k41](/packages/brianhenryie-strauss)[coenjacobs/mozart

Composes all dependencies as a package inside a WordPress plugin

4784.2M30](/packages/coenjacobs-mozart)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M668](/packages/shopware-core)[flarum/core

Delightfully simple forum software.

211.5M2.5k](/packages/flarum-core)

PHPackages © 2026

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