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 Annotation Bundle

Form Annotation Bundle Laravel Package

kunicmarko/form-annotation-bundle

A Symfony bundle for defining forms with annotations on your entity classes. Configure fields and form options directly in code, reduce FormType boilerplate, and build forms automatically. Useful for rapid prototyping and smaller applications.

View on GitHub
Deep Wiki
Context7

kunicmarko/form-annotation-bundle brings annotation-driven form configuration to Symfony applications, letting you declare form fields and options directly above your form class properties instead of repeating them in buildForm(). The bundle reads these annotations at runtime and assembles the form definition for you, keeping configuration close to the data it describes and reducing boilerplate in larger applications.

  • Define form fields, types and options with simple PHP annotations
  • Keeps form configuration next to the entity properties it maps
  • Cuts repetitive add() calls from form type classes
  • Works with standard Symfony form components and validation
  • Lightweight integration via a single bundle registration
Frequently asked questions about Form Annotation Bundle
Is kunicmarko/form-annotation-bundle compatible with Laravel?
No. It is a Symfony bundle built on the Symfony Form component, Symfony's DI container, and Symfony bundle registration, with no Laravel service provider, facade, or Illuminate contracts. Using it in Laravel would require building a container bridge and bootstrapping Symfony Forms inside Laravel, which is a net-new integration project rather than a Composer install. For a Laravel application, treat it as incompatible unless you are prepared to own that bridge.
What does kunicmarko/form-annotation-bundle actually do?
It lets Symfony developers define forms through annotations instead of writing verbose form builder code, keeping form configuration close to entities and classes. The value is a small declarative pattern for form setup, not infrastructure. It is a lightweight convenience layer over Symfony's Form component and annotation reader.
Can I just composer require kunicmarko/form-annotation-bundle in a Laravel project?
You can add the package, but it will not work as a Laravel form solution out of the box. There is no Laravel auto-discovery, no service provider, and no integration with Laravel's validator, Form Requests, or Blade. The package expects Symfony's bundle registration and Form component wiring, so a plain require leaves you with an unintegrated Symfony dependency. A working setup would be a bespoke port, not a supported install.
Why is this package archived, and is it still maintained?
The repository is archived, with zero stars, zero dependents, and a last release dated 2018-02-25. Archived status means no security patches, no PHP version support guarantees, and no upstream triage. There is no community-tested path or documented production use. You should assume maintenance is fully yours if you vendor it.
Does form-annotation-bundle support PHP 8 attributes?
No, not in its published form. The last release predates PHP 8 attributes and targets the Doctrine annotation reader, which is deprecated in modern Symfony and is not part of a standard Laravel install. Any attribute-based usage would require a fork or rewrite. That is one of the main reasons it is unsuitable for current PHP 8.2+ projects.
What Laravel-native alternatives should I use instead of annotation-driven forms?
Use Laravel Form Requests for validation and authorization, the Validator component for rule definitions, and Eloquent casts or API resources for shaping model data. If you want declarative form structure from model metadata, a small in-house implementation using PHP 8 attributes plus Laravel validation is usually 200 to 400 lines of owned code. That keeps the pattern without introducing a second form abstraction layer.
How would I test kunicmarko/form-annotation-bundle in a Laravel app?
There is no supported test path. Any evaluation would be a hard-timeboxed spike: confirm the exact PHP and Laravel versions, try to boot Symfony Forms and its container bridge inside Laravel, and verify one simple form end to end. If it does not run green within a day, stop. Do not build production tests around an archived Symfony bundle in a Laravel codebase.
What are the production risks of using an archived Symfony bundle in Laravel?
You take on all security patching, PHP compatibility work, and dependency pinning for a form layer that handles user input validation. The likely failure mode is not an immediate crash but silent divergence when a transitive dependency updates. You would also run two competing abstraction layers over the same concern, Symfony Forms and Laravel's validation surface, which is a long-term maintainability liability. The recommendation from the technical assessment is do not adopt.
Can I use the Symfony Form component inside Laravel?
Technically you can wire Symfony Form into Laravel with a container bridge and custom service bindings, but it is a substantial integration effort. Symfony Forms uses data mappers, form types, and event-driven transformation, which is a fundamentally different model from Laravel Form Requests and the Validator. You would end up maintaining two form systems. For most Laravel applications the cost exceeds the benefit.
Is there a maintained fork or drop-in replacement for form-annotation-bundle?
There is no known maintained fork, and the original has zero dependents and an archived repository. The practical replacement is not another package but a small internal layer: PHP 8 attributes on models plus Laravel's native validation and Form Requests. That gives you declarative form metadata with a support owner and a clear upgrade path. Read the original as a reference implementation for design ideas, not as a dependency.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections