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
Bus Form Bundle

Bus Form Bundle Laravel Package

pugx/bus-form-bundle

PugxBusFormBundle integrates Symfony Forms with a command/message bus, letting form submissions be dispatched as commands and handled by dedicated bus handlers. It keeps controllers thin, separates form handling from business logic, and enables a cleaner, more testable workflow for Symfony applicati...

View on GitHub
Deep Wiki
Context7

PUGXBusFormBundle integrates Symfony Forms with a command/message bus, making it easy to bind form data directly to command objects and dispatch the command after successful validation. It helps keep controllers thin by moving form-to-command handling into a clear, reusable flow.

  • Bind Symfony form types to command DTOs
  • Dispatch commands automatically on valid submission
  • Separate validation and bus handling from controllers
  • Configure via Symfony services and form integration
  • Reduce boilerplate in command-oriented applications
Frequently asked questions about Bus Form Bundle
Does pugx/bus-form-bundle work with Laravel?
No. Despite being listed in Laravel package catalogs, pugx/bus-form-bundle is a Symfony bundle built on the Symfony Form component and Symfony Messenger. Laravel has no native Symfony Form integration and dispatches work through queued jobs rather than a Messenger command bus, so adopting it would mean importing symfony/form and bridging a bus manually. For Laravel, stay with Form Request validation plus Blade, Livewire, or Inertia forms, and use this bundle only in a Symfony service.
How do I install and register pugx/bus-form-bundle?
Run composer require pugx/bus-form-bundle, then enable the bundle in config/bundles.php for the environments where you need it. In a Symfony Flex application a recipe may register it automatically. After that, autoconfiguration maps Messenger message classes to generated form types, so you can type-hint the generated form in a controller, bind the request, and dispatch the resulting command object.
Which Symfony and PHP versions does pugx/bus-form-bundle support?
The package does not publish a clear compatibility matrix in its overview, so treat the constraints in its composer.json as the only source of truth. Check those constraints against your target, typically Symfony 6.4 LTS or 7.x on PHP 8.2 or newer, before committing. There is no visible evidence of CI-tested version coverage, so run your own smoke tests on the exact Symfony minor you deploy.
How does the bundle turn a command class into a Symfony form?
It introspects the message or command class, typically a DTO with typed properties, and derives a FormType from those properties so a controller can render and bind it without hand-writing a form class. The mapping is convention-based, usually driven by the namespace of your command classes. Simple scalar and string properties map cleanly, while anything the reflection layer cannot guess falls back to a hand-written form type.
Can form submissions be processed asynchronously with Symfony Messenger?
Yes. Because the generated form binds straight to a Messenger message, you can route that message to a transport and let it be handled asynchronously as long as your handler and serialization support it. Synchronous in-process handling also works. The bundle only handles the form-to-message bridge; routing, retries, and failure transport remain standard Messenger configuration.
How do I customize or override a generated form type?
The practical route is to define your own FormType for the message and let it take precedence over the generated one, since the generated form is a convenience rather than a lock-in. Confirm that override strategy against the bundle's configuration before relying on it in production, because the overview does not document an explicit extension hook. Many teams end up hand-writing form types for complex commands anyway.
Does bus-form-bundle respect Symfony validation constraints and validation groups?
This is not documented in the package overview, so verify it directly against your Symfony version rather than assuming. Reflection-driven form generation typically maps property types but does not automatically translate #[Assert\*] attributes into form constraints. If validation correctness is critical, test each command and consider explicit form types or an explicit validator pass on the dispatched command object.
How does it handle enums, nested DTOs, collections, and DateTimeImmutable properties?
Simple scalar types are the sweet spot; enums, nested objects, ArrayCollection properties, unions, nullable combinations, and file uploads are where reflection-based form guessing tends to degrade. Expect to fall back to hand-written form types for those cases, which erodes most of the boilerplate savings. Test representative commands before adopting the bundle broadly.
Is pugx/bus-form-bundle production-ready and actively maintained?
Maturity signals are weak: very few stars, no visible dependents, and a likely single-maintainer bus factor, although a 2026 release indicates the project is at least nominally alive. A release date alone does not prove compatibility with current Symfony versions or meaningful test coverage. For production use, vendor-review the source and be prepared to fork or replace it.
What license does pugx/bus-form-bundle use, and is LGPL-3.0 safe for commercial projects?
It ships under LGPL-3.0, which is generally workable for commercial applications when you consume it as an unmodified dependency. Distribution obligations attach if you modify and redistribute the library. Organizations with blanket copyleft bans will still flag it during license review, so confirm policy before adoption.
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.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib