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 1mo 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 54% 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

3387d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ddf43f36d2a783a854d1a900fca8422e5f271b26645b54344b9bfacae555102?d=identicon)[mpmontanez](/maintainers/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

[afosto/yaac

Yet Another ACME client: a decoupled LetsEncrypt client

245500.4k1](/packages/afosto-yaac)[ckfinder/ckfinder-laravel-package

CKFinder 3 package for Laravel

159497.2k48](/packages/ckfinder-ckfinder-laravel-package)[ckfinder/ckfinder-symfony-bundle

CKFinder bundle for Symfony

42435.7k](/packages/ckfinder-ckfinder-symfony-bundle)[setono/sylius-feed-plugin

Plugin to generate feeds within the Sylius ecommerce platform

26458.2k](/packages/setono-sylius-feed-plugin)[league/flysystem-adapter-decorator

A base implementation of a flysystem adapter decorator

17136.3k1](/packages/league-flysystem-adapter-decorator)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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