2012-04-26 21:33:40 +01:00
|
|
|
CHANGELOG
|
|
|
|
=========
|
|
|
|
|
|
|
|
2.1.0
|
|
|
|
-----
|
|
|
|
|
|
|
|
* [BC BREAK] ``read_only`` field attribute now renders as ``readonly="readonly"``, use ``disabled`` instead
|
|
|
|
* [BC BREAK] child forms now aren't validated anymore by default
|
|
|
|
* made validation of form children configurable (new option: cascade_validation)
|
|
|
|
* added support for validation groups as callbacks
|
|
|
|
* made the translation catalogue configurable via the "translation_domain" option
|
|
|
|
* added Form::getErrorsAsString() to help debugging forms
|
|
|
|
* allowed setting different options for RepeatedType fields (like the label)
|
|
|
|
* added support for empty form name at root level, this enables rendering forms
|
|
|
|
without form name prefix in field names
|
|
|
|
* [BC BREAK] form and field names must start with a letter, digit or underscore
|
|
|
|
and only contain letters, digits, underscores, hyphens and colons
|
|
|
|
* [BC BREAK] changed default name of the prototype in the "collection" type
|
|
|
|
from "$$name$$" to "\__name\__". No dollars are appended/prepended to custom
|
|
|
|
names anymore.
|
|
|
|
* [BC BREAK] improved ChoiceListInterface
|
|
|
|
* [BC BREAK] added SimpleChoiceList and LazyChoiceList as replacement of
|
|
|
|
ArrayChoiceList
|
|
|
|
* added ChoiceList and ObjectChoiceList to use objects as choices
|
|
|
|
* [BC BREAK] removed EntitiesToArrayTransformer and EntityToIdTransformer.
|
|
|
|
The former has been replaced by CollectionToArrayTransformer in combination
|
|
|
|
with EntityChoiceList, the latter is not required in the core anymore.
|
|
|
|
* [BC BREAK] renamed
|
|
|
|
* ArrayToBooleanChoicesTransformer to ChoicesToBooleanArrayTransformer
|
|
|
|
* ScalarToBooleanChoicesTransformer to ChoiceToBooleanArrayTransformer
|
|
|
|
* ArrayToChoicesTransformer to ChoicesToValuesTransformer
|
|
|
|
* ScalarToChoiceTransformer to ChoiceToValueTransformer
|
2012-04-20 17:42:21 +01:00
|
|
|
to be consistent with the naming in ChoiceListInterface.
|
2012-04-26 21:33:40 +01:00
|
|
|
They were merged into ChoiceList and have no public equivalent anymore.
|
|
|
|
* choice fields now throw a FormException if neither the "choices" nor the
|
|
|
|
"choice_list" option is set
|
|
|
|
* the radio type is now a child of the checkbox type
|
|
|
|
* the collection, choice (with multiple selection) and entity (with multiple
|
|
|
|
selection) types now make use of addXxx() and removeXxx() methods in your
|
|
|
|
model if you set "by_reference" to false. For a custom, non-recognized
|
|
|
|
singular form, set the "property_path" option like this: "plural|singular"
|
|
|
|
* forms now don't create an empty object anymore if they are completely
|
|
|
|
empty and not required. The empty value for such forms is null.
|
|
|
|
* added constant Guess::VERY_HIGH_CONFIDENCE
|
|
|
|
* [BC BREAK] The methods `add`, `remove`, `setParent`, `bind` and `setData`
|
|
|
|
in class Form now throw an exception if the form is already bound
|
|
|
|
* fields of constrained classes without a NotBlank or NotNull constraint are
|
|
|
|
set to not required now, as stated in the docs
|
|
|
|
* fixed TimeType and DateTimeType to not display seconds when "widget" is
|
|
|
|
"single_text" unless "with_seconds" is set to true
|
|
|
|
* checkboxes of in an expanded multiple-choice field don't include the choice
|
|
|
|
in their name anymore. Their names terminate with "[]" now.
|
|
|
|
* deprecated FormValidatorInterface and substituted its implementations
|
|
|
|
by event subscribers
|
|
|
|
* simplified CSRF protection and removed the csrf type
|
|
|
|
* deprecated FieldType and merged it into FormType
|
2012-05-24 14:01:02 +01:00
|
|
|
* added new option "compound" that lets you switch between field and form behavior
|
2012-04-20 17:42:21 +01:00
|
|
|
* [BC BREAK] renamed theme blocks
|
|
|
|
* "field_*" to "form_*"
|
2012-05-24 14:01:02 +01:00
|
|
|
* "field_widget" to "form_widget_simple"
|
2012-04-20 17:42:21 +01:00
|
|
|
* "widget_choice_options" to "choice_widget_options"
|
|
|
|
* "generic_label" to "form_label"
|
2012-04-27 09:16:56 +01:00
|
|
|
* added theme blocks "form_widget_compound", "choice_widget_expanded" and
|
2012-04-20 17:42:21 +01:00
|
|
|
"choice_widget_collapsed" to make theming more modular
|
2012-04-26 21:33:40 +01:00
|
|
|
* ValidatorTypeGuesser now guesses "collection" for array type constraint
|
|
|
|
* added method `guessPattern` to FormTypeGuesserInterface to guess which pattern to use in the HTML5 attribute "pattern"
|
|
|
|
* deprecated method `guessMinLength` in favor of `guessPattern`
|
2012-04-20 18:40:14 +01:00
|
|
|
* labels don't display field attributes anymore. Label attributes can be
|
2012-05-01 13:46:26 +01:00
|
|
|
passed in the "label_attr" option/variable
|
2012-05-18 10:20:03 +01:00
|
|
|
* added option "mapped" which should be used instead of setting "property_path" to false
|
2012-05-23 13:24:08 +01:00
|
|
|
* [BC BREAK] "data_class" now *must* be set if a form maps to an object and should be left empty otherwise
|
2012-05-20 16:16:03 +01:00
|
|
|
* improved error mapping on forms
|
2012-05-21 10:35:42 +01:00
|
|
|
* dot (".") rules are now allowed to map errors assigned to a form to
|
|
|
|
one of its children
|
2012-05-21 10:18:32 +01:00
|
|
|
* errors are not mapped to unsynchronized forms anymore
|
2012-05-23 13:24:08 +01:00
|
|
|
* [BC BREAK] changed Form constructor to accept a single `FormConfigInterface` object
|
|
|
|
* [BC BREAK] changed argument order in the FormBuilder constructor
|
2012-05-23 19:21:34 +01:00
|
|
|
* added Form method `getViewData`
|
2012-05-21 08:27:45 +01:00
|
|
|
* deprecated Form methods
|
|
|
|
* `getTypes`
|
|
|
|
* `getErrorBubbling`
|
|
|
|
* `getNormTransformers`
|
|
|
|
* `getClientTransformers`
|
2012-05-23 17:47:14 +01:00
|
|
|
* `getAttribute`
|
|
|
|
* `hasAttribute`
|
2012-05-23 19:21:34 +01:00
|
|
|
* `getClientData`
|
|
|
|
* added FormBuilder methods
|
2012-07-12 18:17:14 +01:00
|
|
|
* `getTypes`
|
2012-05-23 19:21:34 +01:00
|
|
|
* `addViewTransformer`
|
|
|
|
* `getViewTransformers`
|
|
|
|
* `resetViewTransformers`
|
|
|
|
* `addModelTransformer`
|
|
|
|
* `getModelTransformers`
|
|
|
|
* `resetModelTransformers`
|
|
|
|
* deprecated FormBuilder methods
|
|
|
|
* `prependClientTransformer`
|
|
|
|
* `appendClientTransformer`
|
|
|
|
* `getClientTransformers`
|
|
|
|
* `resetClientTransformers`
|
|
|
|
* `prependNormTransformer`
|
|
|
|
* `appendNormTransformer`
|
|
|
|
* `getNormTransformers`
|
|
|
|
* `resetNormTransformers`
|
2012-05-21 16:13:00 +01:00
|
|
|
* deprecated the option "validation_constraint" in favor of the new
|
|
|
|
option "constraints"
|
2012-05-23 13:08:46 +01:00
|
|
|
* removed superfluous methods from DataMapperInterface
|
|
|
|
* `mapFormToData`
|
|
|
|
* `mapDataToForm`
|
2012-05-23 16:29:07 +01:00
|
|
|
* added `setDefaultOptions` to FormTypeInterface and FormTypeExtensionInterface
|
2012-05-23 18:49:55 +01:00
|
|
|
which accepts an OptionsResolverInterface instance
|
2012-05-23 16:29:07 +01:00
|
|
|
* deprecated the methods `getDefaultOptions` and `getAllowedOptionValues`
|
|
|
|
in FormTypeInterface and FormTypeExtensionInterface
|
2012-05-23 17:47:14 +01:00
|
|
|
* options passed during construction can now be accessed from FormConfigInterface
|
2012-07-21 13:26:59 +01:00
|
|
|
* added FormBuilderInterface and FormConfigEditorInterface
|
|
|
|
* [BC BREAK] the method `buildForm` in FormTypeInterface and FormTypeExtensionInterface
|
|
|
|
now receives a FormBuilderInterface instead of a FormBuilder instance
|
2012-05-23 18:34:41 +01:00
|
|
|
* [BC BREAK] the method `buildViewBottomUp` was renamed to `finishView` in
|
|
|
|
FormTypeInterface and FormTypeExtensionInterface
|
2012-05-23 17:47:14 +01:00
|
|
|
* [BC BREAK] the options array is now passed as last argument of the
|
|
|
|
methods
|
|
|
|
* `buildView`
|
2012-05-23 18:34:41 +01:00
|
|
|
* `finishView`
|
2012-05-23 17:47:14 +01:00
|
|
|
in FormTypeInterface and FormTypeExtensionInterface
|
2012-05-23 18:34:41 +01:00
|
|
|
* [BC BREAK] no options are passed to `getParent` of FormTypeInterface anymore
|
2012-05-23 19:58:42 +01:00
|
|
|
* deprecated DataEvent and FilterDataEvent in favor of the new FormEvent which is
|
|
|
|
now passed to all events thrown by the component
|
|
|
|
* FormEvents::BIND now replaces FormEvents::BIND_NORM_DATA
|
|
|
|
* FormEvents::PRE_SET_DATA now replaces FormEvents::SET_DATA
|
|
|
|
* FormEvents::PRE_BIND now replaces FormEvents::BIND_CLIENT_DATA
|
|
|
|
* deprecated FormEvents::SET_DATA, FormEvents::BIND_CLIENT_DATA and
|
|
|
|
FormEvents::BIND_NORM_DATA
|
2012-05-23 20:50:13 +01:00
|
|
|
* [BC BREAK] reversed the order of the first two arguments to `createNamed`
|
|
|
|
and `createNamedBuilder` in `FormFactoryInterface`
|
2012-05-24 13:24:28 +01:00
|
|
|
* deprecated `getChildren` in Form and FormBuilder in favor of `all`
|
|
|
|
* deprecated `hasChildren` in Form and FormBuilder in favor of `count`
|
|
|
|
* FormBuilder now implements \IteratorAggregate
|
2012-07-06 14:33:06 +01:00
|
|
|
* [BC BREAK] compound forms now always need a data mapper
|
2012-07-16 20:54:46 +01:00
|
|
|
* FormBuilder now maintains the order when explicitly adding form builders as children
|
2012-07-09 15:52:31 +01:00
|
|
|
* ChoiceType now doesn't add the empty value anymore if the choices already contain an empty element
|
2012-07-09 16:53:01 +01:00
|
|
|
* DateType, TimeType and DateTimeType now show empty values again if not required
|
2012-07-09 15:09:12 +01:00
|
|
|
* [BC BREAK] fixed rendering of errors for DateType, BirthdayType and similar ones
|
2012-07-09 18:22:35 +01:00
|
|
|
* [BC BREAK] fixed: form constraints are only validated if they belong to the validated group
|
2012-07-09 19:34:45 +01:00
|
|
|
* deprecated `bindRequest` in `Form` and replaced it by a listener to FormEvents::PRE_BIND
|
2012-07-09 20:04:24 +01:00
|
|
|
* fixed: the "data" option supersedes default values from the model
|
2012-07-10 13:53:17 +01:00
|
|
|
* changed DateType to refer to the "format" option for calculating the year and day choices instead
|
|
|
|
of padding them automatically
|
2012-07-11 08:00:11 +01:00
|
|
|
* [BC BREAK] DateType defaults to the format "yyyy-MM-dd" now if the widget is
|
|
|
|
"single_text", in order to support the HTML 5 date field out of the box
|
2012-07-10 16:15:14 +01:00
|
|
|
* added the option "format" to DateTimeType
|
2012-07-11 08:00:11 +01:00
|
|
|
* [BC BREAK] DateTimeType now outputs RFC 3339 dates by default, as generated and
|
|
|
|
consumed by HTML5 browsers, if the widget is "single_text"
|
2012-07-11 08:44:09 +01:00
|
|
|
* deprecated the options "data_timezone" and "user_timezone" in DateType, DateTimeType and TimeType
|
|
|
|
and renamed them to "model_timezone" and "view_timezone"
|
2012-07-11 15:49:59 +01:00
|
|
|
* fixed: TransformationFailedExceptions thrown in the model transformer are now caught by the form
|
2012-07-12 18:17:14 +01:00
|
|
|
* added FormRegistry and ResolvedFormTypeInterface
|
|
|
|
* deprecated FormFactory methods
|
|
|
|
* `addType`
|
|
|
|
* `hasType`
|
|
|
|
* `getType`
|
|
|
|
* [BC BREAK] FormFactory now expects a FormRegistryInterface as constructor argument
|
|
|
|
* [BC BREAK] The method `createBuilder` in FormTypeInterface is not supported anymore for performance reasons
|
|
|
|
* [BC BREAK] Removed `setTypes` from FormBuilder
|
|
|
|
* deprecated AbstractType methods
|
|
|
|
* `getExtensions`
|
|
|
|
* `setExtensions`
|
|
|
|
* ChoiceType now caches its created choice lists to improve performance
|
2012-07-14 11:08:26 +01:00
|
|
|
* [BC BREAK] Rows of a collection field cannot be themed individually anymore. All rows in the collection
|
|
|
|
field now have the same block names, which contains "entry" where it previously contained the row index.
|
2012-07-15 17:58:13 +01:00
|
|
|
* [BC BREAK] When registering a type through the DI extension, the tag alias has to match the actual type name.
|
|
|
|
* added FormRendererInterface, FormRendererEngineInterface and implementations of these interfaces
|
|
|
|
* [BC BREAK] removed the following methods from FormUtil:
|
|
|
|
* `toArrayKey`
|
|
|
|
* `toArrayKeys`
|
|
|
|
* `isChoiceGroup`
|
|
|
|
* `isChoiceSelected`
|
2012-07-21 18:44:09 +01:00
|
|
|
* [BC BREAK] renamed method `renderBlock` in FormHelper to `block` and changed its signature
|
2012-07-21 12:49:32 +01:00
|
|
|
* made FormView properties public and deprecated their accessor methods
|
2012-07-23 18:23:22 +01:00
|
|
|
* made the normalized data of a form accessible in the template through the variable "form.vars.data"
|
|
|
|
* made the original data of a choice accessible in the template through the property "choice.data"
|