effiana/jsonform
Serialize Symfony Forms into JSON Schema for documentation, validation, and client-side form generation. Map form field types to transformers via a resolver, then transform a Form into a JSON schema usable with tools like json-editor or liform-react.
symfony/form or a bridge like laravel-symfony-form). Laravel’s native Illuminate/HTML/FormBuilder or collective/html are incompatible without adaptation.spatie/laravel-symfony-support).FormFactory in Laravel’s service container.Illuminate/Validation).spatie/laravel-json-schema (Laravel-native).| Risk Area | Severity | Mitigation Strategy |
|---|---|---|
| Deprecated Symfony | High | Fork/package updates or replace with modern alternatives. |
| Form Logic Mismatch | Medium | Abstract form definitions to a shared layer. |
| PHP Version Gaps | Medium | Use php80 Docker images or polyfills. |
| Testing Overhead | Low | Focus on critical API endpoints first. |
Rule objects) map to Symfony’s constraints?spatie/laravel-json-schema).effiana/jsonform for one critical form (e.g., user registration).symfony/form and spatie/laravel-symfony-support.effiana/jsonform to abstract Symfony-specific logic.spatie/laravel-json-schema if Symfony overhead is prohibitive.composer require ext-json (if missing).array_column/array_filter in PHP 8.1+.symfony/form:^5.4 and spatie/laravel-symfony-support.TextType, CollectionType). Laravel-specific types (e.g., Illuminate\Html\FormBuilder) require manual mapping.Response::json() with schema metadata).FormFactory binding).roave/security-advisories to monitor Symfony dependencies.Illuminate/Cache).| Scenario | Impact | Recovery Plan |
|---|---|---|
| Package abandonment | High | Fork under org ownership; migrate to alternative. |
| Symfony breaking changes | Medium | Isolate behind a compatibility layer. |
| Schema validation errors | Low | Rollback to previous schema version. |
| PHP version incompatibility | High | Pin to PHP 7.4 or use Docker images. |
FORM_SCHEMA.md to the repo with:
name: Schema Validation
on: [push]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: composer install
- run: php artisan schema:validate # Custom command
JSONFORM_ENABLED).How can I help you explore Laravel packages today?