Download the PHP package chamber-orchestra/form-bundle without Composer

On this page you can find all versions of the php package chamber-orchestra/form-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package form-bundle

PHP Composer Latest Stable Version License PHP 8.5 Symfony 8 PHPStan Max PHP-CS-Fixer Code Style: PER-CS & Symfony

ChamberOrchestra Form Bundle

A Symfony 8 bundle that simplifies JSON-first form handling for REST APIs. It provides controller traits for the submit/validate/response flow, specialized API form types with CSRF disabled, reusable data transformers, Doctrine-backed uniqueness validation, and structured error responses following RFC 9457 (Problem Details for HTTP APIs).

Features

Requirements

Installation

Enable the bundle in config/bundles.php:

Usage

Controller Traits

Use FormTrait for standard HTML form submissions and ApiFormTrait for JSON API endpoints.

handleFormCall() accepts a form class or instance, handles the request, and returns a view or response. handleApiCall() does the same for API endpoints -- it automatically parses JSON payloads for MutationForm types and merges uploaded files.

onFormSubmitted() checks validity, returns a ValidationFailedView on failure, or invokes the callback on success:

API Form Types

Extend QueryForm for GET requests or MutationForm for POST/PUT/PATCH requests. Both disable CSRF protection and use empty block prefixes for clean JSON input/output.

Data Transformers

Transformer Description
TextToBoolTransformer Converts "true", "1", "yes" to boolean
DateTimeToNumberTransformer Converts Unix timestamps to DateTimeInterface objects
ArrayToStringTransformer Converts arrays to/from comma-separated strings
JsonStringToArrayTransformer Parses JSON strings to arrays (handles empty strings)

HiddenEntityType

Loads Doctrine entities by ID from a hidden form field. Supports a custom query_builder option with secure parameterized queries.

UniqueField Validator

Validates field uniqueness against Doctrine repositories. Supports multiple fields, closure-based exclusions, custom normalizers, and targeted error paths.

ProblemNormalizer

Extends Symfony's ProblemNormalizer to translate exception messages when the exception implements TranslatableExceptionInterface. This ensures localized error messages in RFC 9457 problem detail responses.

Response Views

View HTTP Status Description
SuccessView 200 Empty success response
ValidationFailedView 422 Form validation errors with structured ViolationView items
FailureView Configurable Generic error response
RedirectView 301/302 Redirect response for AJAX requests
SuccessHtmlView 200 HTML fragment response for AJAX requests

Testing

Install dependencies and run the full test suite:

The integration test kernel (tests/Integrational/TestKernel.php) boots a minimal Symfony application with in-memory SQLite for Doctrine tests.

License

MIT


All versions of form-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
chamber-orchestra/view-bundle Version 8.2.*
symfony/dependency-injection Version 8.2.*
symfony/config Version 8.2.*
symfony/framework-bundle Version 8.2.*
symfony/runtime Version 8.2.*
symfony/form Version 8.2.*
symfony/validator Version 8.2.*
symfony/translation Version 8.2.*
symfony/clock Version 8.2.*
doctrine/orm Version 3.8.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package chamber-orchestra/form-bundle contains the following files

Loading the files please wait ...