martin-helmich/php-schema2class
Generate PHP classes from JSON schemas
Generates strongly-typed PHP classes with built-in JSON validation and immutable accessor patterns (`withX()` methods) from JSON schemas, supporting backwards compatibility down to PHP 5.6 via a `--target-php` flag. The tool uses the `justinrainbow/json-schema` validator to enforce schema constraints at runtime and automatically infers target namespaces from `composer.json` PSR-4 configuration. Configuration files (`.s2c.yaml`) enable batch generation workflows for evolving schemas in multi-file projects.
Stars
36
Forks
16
Language
PHP
License
MIT
Category
Last pushed
Jan 16, 2026
Commits (30d)
0
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/ai-coding/martin-helmich/php-schema2class"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Related tools
jenner/LstGen
Code-Generator für die Lohnsteuerberechnung aus PAP XML
wol-soft/php-json-schema-model-generator
Creates (immutable) PHP model classes from JSON-Schema files including all validation rules as PHP code
hiqdev/hidev
Automation tool mixed with code generator for easier continuous development
goetas-webservices/xsd2php
Convert XSD into PHP classes and JMS serializer definitions
albireo77/devflowcharter
Flowchart builder and code generator.