ruwork/polyfill-form-dti
A lightweight compatibility polyfill that brings DateTimeImmutable support to Symfony Form date and time types on older framework versions, letting you use immutable date/time form fields without upgrading Symfony.
symfony/* >=4.1) and adds no Laravel-facing surface: no service provider, config, Blade directive, validation rule, or Eloquent cast. It therefore remains relevant only to a Laravel app that deliberately embeds Symfony Form or maintains legacy Symfony forms.>=4.1 "without conflicts," which removes a likely historical blocker for projects pinned to older Symfony components. That is a Composer-level fix only — there is still no framework glue code, so a Laravel team would still write the adapter, rendering, and validation themselves. Copying the MIT-licensed approach into a native component remains more practical than adding the dependency.DateTimeImmutable form mapping, or both? Which Laravel, PHP, and Symfony Form versions must be supported, and does the widened >=4.1 constraint actually resolve cleanly against this app's Symfony 6/7 components (an open-ended lower bound can allow installs that were never tested)? Does the package register a Symfony Form type extension/bundle, and would that conflict with Laravel's Symfony components? Is there a maintained native Symfony feature that supersedes it? Can the behavior be implemented with a Blade component plus CarbonImmutable/DateTimeImmutable casts? Who owns a fork if adopted, and what is the exit plan if 0.2.1 proves to be the last release?TPM recommendation: Do not adopt as a production dependency for Laravel. Treat it as a reference implementation for a small native Blade/validation solution, unless a legacy Symfony Form workflow must be preserved. The 0.2.1 constraint widening is a positive signal worth noting, but it does not change the architecture fit, the absence of Laravel integration, or the ownership burden.
datetime-local inputs, Laravel validation rules such as date/after/before, and CarbonImmutable or DateTimeImmutable casts. Release 0.2.1 does not touch Laravel's form model, validation, or persistence layers.>=4.1 without conflicts, so the old "likely constrained to older Symfony/PHP" objection is less absolute. Still verify Composer constraints before any spike: the constraint is a lower bound, not a tested support matrix, and there is no evidence of validation against Symfony 6/7 or PHP 8.2+. Do not add it globally to a Laravel composer manifest without a dry-run and an isolated proof.composer require --dry-run on the current 0.2.1 tag in a throwaway branch — this is now the cheapest test and may pass where it previously failed. 3) Prototype only in an isolated module if legacy Symfony Form compatibility is mandatory. 4) Otherwise implement the behavior natively in Blade plus Laravel validation/casts. 5) Add tests for timezone/DST, immutable value handling, browser rendering, and validation. 6) Pin to 0.2.1 or fork only if adoption is unavoidable, with an explicit retirement plan.>=4.1 constraint can silently permit future untested Symfony majors, so version pinning becomes more important, not less.How can I help you explore Laravel packages today?