limenius/liform-bundle
LiformBundle generates JSON Schema from your Symfony forms, letting JavaScript libraries like liform-react render them client-side. It bridges server-side form definitions and modern frontend UIs, keeping validation rules and field structure in one place.
limenius/liform-bundle is a Symfony Bundle wrapping the limenius/liform core library. It only supports decisions where the backend is Symfony (or where you are explicitly weighing a Symfony-based service against your Laravel stack). For a Laravel codebase, the decision it actually supports is "do not adopt as-is; evaluate a port or an internal build."Form types on the server and hand-written JSON Schema or React/Vue form definitions on the client — Liform converts the server-side form definition into JSON Schema, making the Symfony Form the single source of truth. That is a concrete, measurable saving: one definition instead of two, and no drift when validation rules change. "Buy" here means a small MIT-licensed dependency; the alternative "build" is a bespoke exporter.Adopt or pilot when all of these hold:
symfony/form — not a thin or legacy form layer.Look elsewhere when:
limenius/liform core (pure PHP, emits portable JSON Schema); the bundle's DI wiring, config tree, and Twig helpers are Symfony-specific and not reusable. The Laravel equivalent source of truth is FormRequest rules plus Validator, so the generator would need to be rewritten against Laravel's rule set — estimate that as a small internal build (roughly 2–4 weeks for a solid v1 covering common rules), not an adoption. Pulling symfony/form into a Laravel app purely to feed the generator is an anti-pattern worth avoiding.$ref composition across models, precise oneOf/anyOf from polymorphic forms. Verify against your trickiest form (nested collections, conditional required fields, custom constraints) before committing; this is exactly where generators leak.exclusiveMinimum, $defs vs definitions, and nullable-vs-type-unions. Pin the draft explicitly as config rather than relying on the generator default.To executives: This is a small, MIT-licensed utility that turns existing server-side form definitions into JSON Schema, so the frontend can render forms from a machine-readable contract instead of a second, hand-maintained copy. The upside is eliminating a whole class of "the client form and the server validation disagree" bugs and shortening the loop for adding or changing fields — one definition, one place to change it. License cost is zero; integration effort is low for a Symfony service. The risks are scope and maintenance: it is a Symfony bundle, not a Laravel package, so it does not apply to our Laravel codebase without a rewrite; and it is a niche project with a single dominant maintainer and no meaningful downstream ecosystem. Recommendation: a time-boxed pilot behind our own thin abstraction on one non-critical form, structured so we can swap or fork if it stalls — not a platform commitment. If the target codebase is Laravel, the decision is instead to scope an internal build against Laravel's validator.
To engineering: One integration point — take a Symfony Form type, emit JSON Schema, publish or serve it. Put it behind an internal interface so removal later is a one-file change. On Laravel, spike for one week with limenius/liform plus symfony/form in a scratch branch to isolate whether the generator's output shape is right from whether a port is cheap; if the output quality is marginal, stop, because the port cost is not justified. If it is right, port a Laravel-native ValidationRuleSet → SchemaObject generator with an explicit handler per rule and a registry that fails loudly on unmapped rules rather than silently dropping them, then lock it down with snapshot/golden-file tests so schema changes surface as diffs in review. Generate schemas at build time (artisan schema:dump) rather than per-request — schemas are deterministic, so scaling becomes a non-issue. Pin the JSON Schema draft, decide the nullable convention once (absence from required plus a ["string","null"] type union) and test it, and use Liform's collection handling as a reference for recursive array-rule walking. Validate the mapping against our three most complex forms before committing.
How can I help you explore Laravel packages today?