All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Fixed the Twig version. Reverted to the previous Twig version. The latest 1.x version has some issues.
Twig
minimal version supported setted to>=1.44.7
.- Fixed select_option.html. Always ensure that the value is included in the option tag.
- Changed
__wake()
method visibility to public. PHP8 compatibility.
- Added support for php8 removing package
fleshgrinder/format
from project. This package is no longer needed, its functionality has been replaced by native php code.
- Fixed Twig class paths
- Moved validation of invalid file to validate function to avoid wrong behavior.
- Added missing varible (attributes) to
BoundWidget
class
- Validate choice field if is not empty and if is not a valid choice
- Validation of dates
- Forced choice value to be string when marking selected
data
andfiles
were wrongly exposed onForm
class. Changed visibility to private and addedgetData
andgetFiles
methods.- Allow non-required file fields
- Fixed choice field values check
- Added retrocompability between Twig v1 and v2
- Fixed Widget format value
setRequired
toField
class;- Twig Filter
merge_str
to merge value into as array value through implode.
- Form field error class being ignored in
Bootstrap4TemplatePack
.
Twig
minimal version supported setted to>=1.35
.
- Loading
Twig
classes with psr-4 mode; - Select
option
tag don't rendervalue
if it is empty.
- Documentation of package;
- Renderers to facilitate integrations of template-engines:
- Added
Renderer
interface; - Added
TwigRenderer
that integratestwig/twig
; - Added fallback template loading support.
- Added
- Template packs to facilitate customization and extensibility of templates:
- Added abstract class
TemplatePack
; - Added template pack
DefaultTemplatePack
. Defined as default template pack; - Added template pack
Bootstrap4TemplatePack
that integrates Bootstrap v4.0.0-beta.2.
- Added abstract class
Config
singleton class allowing:- Configure custom template packs;
- Configure custom messages;
- Configure custom renderers.
- Added extra arg
label
to methodgetContext
ofWidget
class; BoundWidget
class to represent the choices of aChoiceWidget
inBoundField
, allowing individual render or data access to each option.
BoundField
moved fromFields
to new namespaceBounds
;BoundField
attribute namechoices
changed tooptions
;BoundField
attributeoptions
now return an array instead of formated string;Widgets
,labelTag
andErrorList
now render through default renderer instead of formatterfleshgrinder/format
;CheckboxSelectMultiple
andRadioSelect
widget wrapped in an unordered list tag instead of previousdiv
;- Method name
getSubWidgets
togetOptions
inWidgets
class and now returns an array instead of formated string; messages.php
to class based definition.
PHPFormConfig
class. Use newConfig
class instead to configurePHPForm
;Attribute
class. All static methods, exceptflatattr
which is no longer used, where migrated tohelpers.php
;- Method
asUL
fromErrorList
class.
- Added CHANGELOG.md file.
- Fix formatValue method on ChoiceWidget when value is empty or null;
- Fix validate on ChoiceField when value if empty and not required.
- First release;