Skip to content

Release v1.0.0

Choose a tag to compare

@github-actions github-actions released this 03 Mar 23:13
· 133 commits to main since this release

Release 1.0.0
First stable release. See docs/CHANGELOG.md for full changelog.

Changelog

Added

  • FormOptionsMerger and FormOptionsTrait: convention-based label, placeholder, help keys (form_snake.field_snake.*), configurable translation_domain, defaults.attr, defaults.row_attr, and cascading merge (config → field type → field options).
  • Multiple configs: configs with named entries (each with alias, translation_domain, defaults, field_types) and default_config. Forms can select a config via setFormKitConfigName().
  • Phase 2 helpers on FormOptionsTrait and FormKitTrait: addText(), addEmail(), addTextarea(), addPassword(), addUrl(), addInteger(), addNumber(), addCheckbox(), addChoice(). Pass only field name and options; no form type class needed.
  • buildFormFromArray(): Define all fields in one array; supported in FormOptionsTrait (type = FQCN) and FormKitTrait (type = snake_case).
  • FormTypeMap and type_map config: map snake_case type names to form type FQCNs. Built-in types plus optional types when the package is installed: dropzone (Symfony UX Dropzone), cropper (Symfony UX Cropper.js), translations (A2lix TranslationFormBundle). Custom types via nowo_form_kit.type_map.
  • FormKitTrait and FormKitAbstractType: alternative path using snake_case type names and FormTypeMap, now aligned with FormOptionsMerger and the same configs / default_config model.
  • Demos (Symfony 6, 7, 8): FormType example (all field types, buildFormFromArray), form built in controller with FormOptionsMerger::resolve(), Search form (inline/horizontal layout), Example form (card/stacked layout).

Changed

  • Legacy root-level translation_domain, defaults, field_types are normalized into a single default config when configs is not set.
  • a2lix/translation-form-bundle constraint relaxed to ^3.2 || ^4.0 so PHP 8.2 projects can use 3.x (4.x requires PHP 8.4).
  • Makefile: Docker Compose now uses --project-directory $(CURDIR) so /app in the container always mounts the bundle root; added down-dev target to stop the dev container.

Full Changelog: https://github.com/nowo-tech/FormKitBundle/commits/v1.0.0