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

imatic/form-bundle

Imatic Form Bundle is a PHP package for building and managing forms with reusable components, flexible configuration, and straightforward validation, helping developers create consistent form workflows and speed up application development.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Verify the framework before you install anything. imatic/form-bundle is a Symfony bundle, not a Laravel package. Its code is built around Symfony\Component\Form, Bundle subclasses, DI extensions, and service tags like form.type / form.type_extension. If your app is Laravel, the correct first step is to not require it — there is no service container, bundle registration, or Form component for it to plug into. Read the source as a design reference instead (see Implementation Patterns).
  • If you are on Symfony, install with composer require imatic/form-bundle, then register it in config/bundles.php:
    Imatic\FormBundle\ImaticFormBundle::class => ['all' => true],
    
    Do not assume the class name or namespace. Confirm both against composer.json (autoload.psr-4) and src/*Bundle.php — a mismatch here is the most common first-run failure.
  • Look here first, in this order: composer.json (the symfony/form and PHP constraints decide whether this is even viable), src/DependencyInjection/Configuration.php and the extension class (the only real configuration surface), src/Form/ (types, extensions, data transformers), then src/Resources/ (Twig themes, translations, routes). With a package this small, the source is the documentation.
  • Measure the delta before adopting. Build one plain Symfony form with a TextType and a DateType, render it, then enable the bundle and render again. Run bin/console debug:form and bin/console debug:container --tag=form.type to see exactly which types and extensions the bundle registers. That single experiment tells you what the bundle actually does faster than any README.
  • For a Laravel developer, the first use case is a port, not an install. Open src/Form/ and ask of each class: "what Laravel primitive replaces this?" Custom types usually map to Blade components or FormRequest fields; type extensions map to shared validation rules or a base request class; Twig helpers map to Blade components. Spike one form end-to-end natively before deciding you need anything from the bundle at all.

Implementation Patterns

  • Prefer global type extensions over subclassing. If the bundle's value is FormTypeExtensionInterface implementations, they attach to every instance of a field type automatically. Consume them through per-field options declared in configureOptions rather than creating parallel form types — subclasses multiply the surface you must retest on every Symfony upgrade.
  • Use shipped form types as ordinary autowired services. Inject them through the constructor of the type that needs them and call ->add('field', MyType::class, [...]) exactly as you would a core type. Do not add factory wrappers or a second registration layer on top.
  • Keep the controller path boring. createForm(), handleRequest(), isValid(), $form->getData() should remain untouched. If the bundle exposes helpers, treat them as thin conveniences; anything that replaces the standard submit/validate flow is coupling you will pay for later.
  • Register Twig form themes explicitly, don't rely on autodiscovery:
    # config/packages/twig.yaml
    twig:
        form_themes: ['@ImaticForm/form_layout.html.twig']
    
    Override individual blocks in your own theme file and point form_themes at yours — never edit vendor templates.
  • Import bundled routes explicitly in config/routes.yaml if any AJAX/validation endpoints ship with the bundle, and reference them by name from your frontend rather than hardcoding paths.
  • Wrap the bundle behind one seam. Put its helpers behind a single app-level service, trait, or Twig component. With one maintainer and a single star, the ability to remove or replace it by editing one file is worth more than the abstraction cost.
  • On Laravel, translate rather than integrate. FormRequest per operation for validation and authorization, custom Rule objects for reusable constraints, spatie/laravel-data if you want typed DTOs, and Blade components or Livewire for dynamic/repeating fields. This gives you the same ergonomics the bundle aims at, on a first-party, documented, upgrade-safe stack.
  • If you must adopt (Symfony only), fork deliberately. Move the code to an internal namespace, add a fixture per shipped type/extension to your test suite, pin the version in composer.json, and record provenance plus the MIT attribution. That fixture suite is your only upgrade safety net.
  • One adapter, one migration path. Whatever you take from the bundle — a type extension, a theme block, a validator helper — route all call sites through your own seam so a future Symfony major bump requires changing one file, not fifty templates.

Gotchas and Tips

  • Gate on composer.json first. Check the symfony/form range, the PHP floor, and the last tagged release. Low-usage bundles like this one are frequently pinned to Symfony 2.x/3.x; form types, options resolvers, and event names have shifted since, so loading it on Symfony 6/7 may fail at boot or, worse, at submit time.
  • Form type extensions are global side effects. Once enabled, they fire on every form in the application, including forms defined by third-party bundles. After enabling, audit existing forms for changed rendering, labels, help text, and validation behavior — regressions here are subtle and easy to ship.
  • Watch for autoconfiguration gaps. If services aren't tagged or autowired, import the bundle's service config or add its resource paths manually in services.yaml. bin/console debug:container 'Imatic' confirms whether services actually exist in the container; if they don't, the bundle is registered but inert.
  • Debug with the profiler, not print statements. Use debug:form, debug:container --tag=form.type_extension, debug:twig, and the Form panel in the Web Profiler. Most "the bundle isn't working" reports resolve to a theme not registered or an extension not tagged.
  • Zero dependents means zero compatibility validation. No downstream project has proven this works with any supported Symfony version. Budget for forking on day one; the MIT license makes that legal but transfers all ownership, testing, and security response to you.
  • No advisory channel. With one star, no dependents, and no visible security policy, a vulnerability in transitive form handling goes unannounced. Track the transitive tree yourself or keep the dependency count at zero.
  • Failures are runtime, not boot-time. A deprecation in an options resolver or a removed service tag typically surfaces as a broken form submission in production rather than a container compile error. Have an integration test that renders and submits each form the bundle touches.
  • Don't run two validation paradigms. In Laravel, pulling in Symfony Form alongside Validator and FormRequest gives you two sources of truth for rules, messages, and error bags. Pick the native one; the bundle has no compensating capability to justify the split.
  • Don't edit vendor files. Override templates via your own theme, override configuration via config/packages/imatic_form.yaml (confirm the exact key from Configuration.php), and if you need behavior changes, fork to an internal namespace where you can actually test them.
  • Record the decision. Note in your dependency review that this surfaced as a "Laravel/PHP" candidate but is a Symfony bundle with effectively no adoption — that feedback keeps the shortlist from refilling with the same noise.
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.
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle
glavweb/extra-bundle
glavweb/api-bundle
glavweb/admin-bundle
adachsoft/api-version-bundle
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
cgv/localized-resource