Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Form Bundle Laravel Package

symfony-hackers/form-bundle

Symfony Hackers Form Bundle provides Symfony framework integration for form handling, bundling form-related services and configuration for Symfony applications. A small, low-adoption package; check compatibility and maintenance status before adopting.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Reality check first: this is a Symfony bundle, not a Laravel package. There is no FormServiceProvider, no config/ publish tag, and the form types all extend Symfony\Component\Form\AbstractType. Installing it into a Laravel app will autoload classes but won't wire anything up.
  • Where to look first: Form/Type/ for the actual form type classes (the only genuinely transferable asset), DependencyInjection/ for the extension, and Resources/config/ for service definitions. Skim the type classes before anything else — that's where the useful field logic lives.
  • Minimal first use case: read a single type (typically a third-party widget — date picker, rich-text, uploader), then re-implement that input as a Blade component plus a FormRequest rule. That re-implementation is the realistic "install" for a Laravel developer.
  • If you truly need Symfony Forms: require symfony/form directly and build forms manually. You do not need this bundle to do that — the bundle only adds pre-packaged types.

Implementation Patterns

  • Port-the-type: copy one AbstractType class into your app, replace __construct DI with container injection, register it in a service provider, and render it with a Blade component instead of a Twig form theme.
  • Widget-wrapper: the bundle's real value is its widget integrations. In Laravel, encapsulate each as a Blade component (<x-form.color .../>), a matching validation rule, and a @push('scripts') initializer — not as a form type.
  • Validation mapping: Symfony type-level constraints ('constraints' => [new NotBlank()]) map almost 1:1 to Laravel rules inside a FormRequest. Keep the type-option → rule mapping table handy while porting.
  • Symfony-Forms bridge (rare): bind a FormFactoryInterface in a SymfonyFormServiceProvider, then render with one Blade layout that approximates form_div_layout.html.twig. Most teams abandon this once they hit the template layer.
  • Data binding: Symfony's Form::handleRequest() has no Laravel equivalent; use $request->validated() plus $model->fill() inside a form request or action class.

Gotchas and Tips

  • Archived and unmaintained (4 stars, 0 dependents). Expect Symfony 2/3-era APIs — AbstractType::setDefaultOptions() and getName() — that fatal on modern Symfony. Check every method signature before copying a type.
  • No Laravel integration: the bundle class extends Symfony\Component\HttpKernel\Bundle\Bundle. composer require can succeed while nothing auto-registers.
  • Twig dependency: anything under Resources/views/ is Twig. Blade can't consume it, so the markup must be rewritten regardless of how cleanly the PHP ports.
  • Asset paths: bundles reference Resources/public/ via assets:install. Laravel's Vite pipeline won't see those files — re-bundle the JS/CSS yourself.
  • CSRF and old input: Symfony form CSRF tokens and form.vars don't exist in Laravel. Rely on @csrf, old(), and $errors.
  • Extension points if you do port: implement FormTypeInterface directly rather than extending AbstractType, and use configureOptions(OptionsResolver $resolver) to dodge deprecated option-resolver APIs.
  • Debugging: dump getBlockPrefix() on any type you port — a non-default prefix means the Twig theme lookup is the first thing that breaks, which usually manifests as a blank or unstyled field.
  • Recommendation: treat the repo as a cookbook/reference, not a dependency. Copy the one or two field types you actually need; do not vendor the bundle into a Laravel app.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource