rogerdsh/liform
Liform is a lightweight form-building package for Laravel. Define forms in PHP, render them in Blade, and handle validation with minimal boilerplate—keeping markup consistent and controllers clean. A simple fit for admin panels and small apps.
Liform occupies a narrow but useful niche: it walks a Symfony Form's type tree and emits a JSON Schema document describing the form's fields, types, and constraints. That makes it a bridge between server-side form definitions and client-side renderers (react-jsonschema-form, Formik schema adapters, API documentation generators). The package under evaluation is a fork with no visible adoption: 0 stars, 0 dependents, and a score of 0. It should be treated as source code to be vendored, not a dependency to be trusted.
Architecture fit. Poor out of the box for a typical Laravel application. Laravel's form story is FormRequest + the Validator facade; Symfony Forms is a separate component with its own FormType, FormBuilder, and event system. Adopting Liform means introducing symfony/form into a Laravel codebase and authoring FormType classes as a second source of truth alongside existing validation rules. The fit becomes strong only in two scenarios: (a) the application already uses Symfony Forms (e.g., a legacy component or a Symfony service embedded in a Laravel monolith), or (b) the team deliberately wants a form-definition-as-source-of-truth model where one PHP class generates both validation and the client schema.
Integration feasibility. Mechanically straightforward. It is a plain Composer library — no service provider, no facade, no config file, no published migrations. You composer require it, instantiate the renderer, and pass a built FormInterface. The real work is the adapter layer you will write yourself. Watch the symfony/form version constraint: Laravel ships several Symfony components but not symfony/form, so this will be a net-new transitive dependency. Verify the package's constraint against the Symfony version range your PHP and Laravel versions permit before committing.
Technical risk. High, and mostly non-technical. The failure mode here is not "the code is wrong" — the code is probably fine — it is "nobody is home." Zero dependents means no downstream projects have absorbed breaking changes, no issue tracker has pressure-tested edge cases, and no security advisory feed will notify you of a vulnerability in this package's own code. The library is also likely a fork of the long-standing liform project; if so, the fork's delta from upstream is the single most important thing to understand, because you are inheriting whatever state upstream was left in.
Key questions for the maintainer (or for your own due diligence).
liform project, and why was the fork created?symfony/form major versions are supported, and is there a CI matrix proving it?FormType classes, PRE_SET_DATA/POST_SUBMIT listeners, and dynamic field modification handled — silently dropped, or reflected?Stack fit. Treat Liform as an internal utility, not a framework citizen. The idiomatic Laravel pattern is a thin service class — something like FormSchemaService — registered in a service provider, that accepts a FormInterface and returns an array or stdClass suitable for response()->json(). Keep the Liform calls isolated so the library can be swapped or replaced without touching controllers.
Migration path. Two viable paths, and the choice should be made explicitly rather than drifted into:
FormRequest rules as FormType classes to get schema output, then maintaining both. A more proportionate alternative is generating JSON Schema directly from Laravel rules with a small in-house mapper, or using a maintained schema library such as opis/json-schema for validation and a hand-curated schema file for the client contract. Liform only pays for itself if the form definition is genuinely reused across validation and rendering.Compatibility. Confirm three things before writing code: the package's supported PHP range versus your deployment target, its symfony/form constraint versus what Composer resolves in your tree, and whether it pulls additional Symfony components that conflict with Laravel's pinned versions. Symfony components are generally backward-compatible within a major, but Laravel pins specific minors in composer.json and conflicts surface at install time, not runtime.
Sequencing.
NotBlank becomes required and Length becomes minLength/maxLength.Maintenance. Effectively zero external maintenance and correspondingly high internal maintenance. Because there are no dependents, no one else will file the bug report you are about to file, and no one will submit the fix. Plan to vendor the repository into your own organization, pin to a specific commit hash rather than a version constraint, and assign a named owner. Budget perhaps one to two engineer-days per year for dependency bumps, plus the initial integration effort.
Support. There is no support channel. Documentation, if present, is a README written for the author. Onboarding material must be written in-house. The mitigating factor is surface area: the library is small and readable, so a competent PHP engineer can audit the full source in an afternoon — which is exactly what should happen before it reaches production.
Scaling. Runtime cost is negligible. Schema generation is a pure in-memory traversal of the form tree; the operation scales with form complexity, not traffic, provided you cache the output. Storage and serialization costs are trivial. The scaling concern is organizational: as the number of FormType classes grows, so does the implicit coupling between your HTTP validation layer and this library's reflection behavior.
Failure modes, ranked.
FormType alters the emitted schema in a way that breaks the frontend renderer. Mitigated by contract tests on the JSON output.Ramp-up. The library itself takes hours to learn. The real cost is the prerequisite: a Laravel team unfamiliar with Symfony Forms must learn FormType, FormBuilder, the form event lifecycle, and the constraint model before the first useful schema can be produced. That is a multi-day investment for engineers who have only worked in Laravel, and it is the dominant line item in any cost estimate for this integration. If the team already knows Symfony Forms, most of this cost disappears and the package becomes a cheap, if slightly risky, accelerator.
How can I help you explore Laravel packages today?