]>
Commit | Line | Data |
---|---|---|
4f5b44bd NL |
1 | CHANGELOG |
2 | ========= | |
3 | ||
4 | ||
5 | 2.3.0 | |
6 | ------ | |
7 | ||
8 | * deprecated FormPerformanceTestCase and FormIntegrationTestCase in the Symfony\Component\Form\Tests namespace and moved them to the Symfony\Component\Form\Test namespace | |
9 | * deprecated TypeTestCase in the Symfony\Component\Form\Tests\Extension\Core\Type namespace and moved it to the Symfony\Component\Form\Test namespace | |
10 | * changed FormRenderer::humanize() to humanize also camel cased field name | |
11 | * added RequestHandlerInterface and FormInterface::handleRequest() | |
12 | * deprecated passing a Request instance to FormInterface::bind() | |
13 | * added options "method" and "action" to FormType | |
14 | * deprecated option "virtual" in favor "inherit_data" | |
15 | * deprecated VirtualFormAwareIterator in favor of InheritDataAwareIterator | |
16 | * [BC BREAK] removed the "array" type hint from DataMapperInterface | |
17 | * improved forms inheriting their parent data to actually return that data from getData(), getNormData() and getViewData() | |
18 | * added component-level exceptions for various SPL exceptions | |
19 | changed all uses of the deprecated Exception class to use more specialized exceptions instead | |
20 | removed NotInitializedException, NotValidException, TypeDefinitionException, TypeLoaderException, CreationException | |
21 | * added events PRE_SUBMIT, SUBMIT and POST_SUBMIT | |
22 | * deprecated events PRE_BIND, BIND and POST_BIND | |
23 | * [BC BREAK] renamed bind() and isBound() in FormInterface to submit() and isSubmitted() | |
24 | * added methods submit() and isSubmitted() to Form | |
25 | * deprecated bind() and isBound() in Form | |
26 | * deprecated AlreadyBoundException in favor of AlreadySubmittedException | |
27 | * added support for PATCH requests | |
28 | * [BC BREAK] added initialize() to FormInterface | |
29 | * [BC BREAK] added getAutoInitialize() to FormConfigInterface | |
30 | * [BC BREAK] added setAutoInitialize() to FormConfigBuilderInterface | |
31 | * [BC BREAK] initialization for Form instances added to a form tree must be manually disabled | |
32 | * PRE_SET_DATA is now guaranteed to be called after children were added by the form builder, | |
33 | unless FormInterface::setData() is called manually | |
34 | * fixed CSRF error message to be translated | |
35 | * custom CSRF error messages can now be set through the "csrf_message" option | |
36 | * fixed: expanded single-choice fields now show a radio button for the empty value | |
37 | ||
38 | 2.2.0 | |
39 | ----- | |
40 | ||
41 | * TrimListener now removes unicode whitespaces | |
42 | * deprecated getParent(), setParent() and hasParent() in FormBuilderInterface | |
43 | * FormInterface::add() now accepts a FormInterface instance OR a field's name, type and options | |
44 | * removed special characters between the choice or text fields of DateType unless | |
45 | the option "format" is set to a custom value | |
46 | * deprecated FormException and introduced ExceptionInterface instead | |
47 | * [BC BREAK] FormException is now an interface | |
48 | * protected FormBuilder methods from being called when it is turned into a FormConfigInterface with getFormConfig() | |
49 | * [BC BREAK] inserted argument `$message` in the constructor of `FormError` | |
50 | * the PropertyPath class and related classes were moved to a dedicated | |
51 | PropertyAccess component. During the move, InvalidPropertyException was | |
52 | renamed to NoSuchPropertyException. FormUtil was split: FormUtil::singularify() | |
53 | can now be found in Symfony\Component\PropertyAccess\StringUtil. The methods | |
54 | getValue() and setValue() from PropertyPath were extracted into a new class | |
55 | PropertyAccessor. | |
56 | * added an optional PropertyAccessorInterface parameter to FormType, | |
57 | ObjectChoiceList and PropertyPathMapper | |
58 | * [BC BREAK] PropertyPathMapper and FormType now have a constructor | |
59 | * [BC BREAK] setting the option "validation_groups" to ``false`` now disables validation | |
60 | instead of assuming group "Default" | |
61 | ||
62 | 2.1.0 | |
63 | ----- | |
64 | ||
65 | * [BC BREAK] ``read_only`` field attribute now renders as ``readonly="readonly"``, use ``disabled`` instead | |
66 | * [BC BREAK] child forms now aren't validated anymore by default | |
67 | * made validation of form children configurable (new option: cascade_validation) | |
68 | * added support for validation groups as callbacks | |
69 | * made the translation catalogue configurable via the "translation_domain" option | |
70 | * added Form::getErrorsAsString() to help debugging forms | |
71 | * allowed setting different options for RepeatedType fields (like the label) | |
72 | * added support for empty form name at root level, this enables rendering forms | |
73 | without form name prefix in field names | |
74 | * [BC BREAK] form and field names must start with a letter, digit or underscore | |
75 | and only contain letters, digits, underscores, hyphens and colons | |
76 | * [BC BREAK] changed default name of the prototype in the "collection" type | |
77 | from "$$name$$" to "\__name\__". No dollars are appended/prepended to custom | |
78 | names anymore. | |
79 | * [BC BREAK] improved ChoiceListInterface | |
80 | * [BC BREAK] added SimpleChoiceList and LazyChoiceList as replacement of | |
81 | ArrayChoiceList | |
82 | * added ChoiceList and ObjectChoiceList to use objects as choices | |
83 | * [BC BREAK] removed EntitiesToArrayTransformer and EntityToIdTransformer. | |
84 | The former has been replaced by CollectionToArrayTransformer in combination | |
85 | with EntityChoiceList, the latter is not required in the core anymore. | |
86 | * [BC BREAK] renamed | |
87 | * ArrayToBooleanChoicesTransformer to ChoicesToBooleanArrayTransformer | |
88 | * ScalarToBooleanChoicesTransformer to ChoiceToBooleanArrayTransformer | |
89 | * ArrayToChoicesTransformer to ChoicesToValuesTransformer | |
90 | * ScalarToChoiceTransformer to ChoiceToValueTransformer | |
91 | to be consistent with the naming in ChoiceListInterface. | |
92 | They were merged into ChoiceList and have no public equivalent anymore. | |
93 | * choice fields now throw a FormException if neither the "choices" nor the | |
94 | "choice_list" option is set | |
95 | * the radio type is now a child of the checkbox type | |
96 | * the collection, choice (with multiple selection) and entity (with multiple | |
97 | selection) types now make use of addXxx() and removeXxx() methods in your | |
98 | model if you set "by_reference" to false. For a custom, non-recognized | |
99 | singular form, set the "property_path" option like this: "plural|singular" | |
100 | * forms now don't create an empty object anymore if they are completely | |
101 | empty and not required. The empty value for such forms is null. | |
102 | * added constant Guess::VERY_HIGH_CONFIDENCE | |
103 | * [BC BREAK] The methods `add`, `remove`, `setParent`, `bind` and `setData` | |
104 | in class Form now throw an exception if the form is already bound | |
105 | * fields of constrained classes without a NotBlank or NotNull constraint are | |
106 | set to not required now, as stated in the docs | |
107 | * fixed TimeType and DateTimeType to not display seconds when "widget" is | |
108 | "single_text" unless "with_seconds" is set to true | |
109 | * checkboxes of in an expanded multiple-choice field don't include the choice | |
110 | in their name anymore. Their names terminate with "[]" now. | |
111 | * deprecated FormValidatorInterface and substituted its implementations | |
112 | by event subscribers | |
113 | * simplified CSRF protection and removed the csrf type | |
114 | * deprecated FieldType and merged it into FormType | |
115 | * added new option "compound" that lets you switch between field and form behavior | |
116 | * [BC BREAK] renamed theme blocks | |
117 | * "field_*" to "form_*" | |
118 | * "field_widget" to "form_widget_simple" | |
119 | * "widget_choice_options" to "choice_widget_options" | |
120 | * "generic_label" to "form_label" | |
121 | * added theme blocks "form_widget_compound", "choice_widget_expanded" and | |
122 | "choice_widget_collapsed" to make theming more modular | |
123 | * ValidatorTypeGuesser now guesses "collection" for array type constraint | |
124 | * added method `guessPattern` to FormTypeGuesserInterface to guess which pattern to use in the HTML5 attribute "pattern" | |
125 | * deprecated method `guessMinLength` in favor of `guessPattern` | |
126 | * labels don't display field attributes anymore. Label attributes can be | |
127 | passed in the "label_attr" option/variable | |
128 | * added option "mapped" which should be used instead of setting "property_path" to false | |
129 | * [BC BREAK] "data_class" now *must* be set if a form maps to an object and should be left empty otherwise | |
130 | * improved error mapping on forms | |
131 | * dot (".") rules are now allowed to map errors assigned to a form to | |
132 | one of its children | |
133 | * errors are not mapped to unsynchronized forms anymore | |
134 | * [BC BREAK] changed Form constructor to accept a single `FormConfigInterface` object | |
135 | * [BC BREAK] changed argument order in the FormBuilder constructor | |
136 | * added Form method `getViewData` | |
137 | * deprecated Form methods | |
138 | * `getTypes` | |
139 | * `getErrorBubbling` | |
140 | * `getNormTransformers` | |
141 | * `getClientTransformers` | |
142 | * `getAttribute` | |
143 | * `hasAttribute` | |
144 | * `getClientData` | |
145 | * added FormBuilder methods | |
146 | * `getTypes` | |
147 | * `addViewTransformer` | |
148 | * `getViewTransformers` | |
149 | * `resetViewTransformers` | |
150 | * `addModelTransformer` | |
151 | * `getModelTransformers` | |
152 | * `resetModelTransformers` | |
153 | * deprecated FormBuilder methods | |
154 | * `prependClientTransformer` | |
155 | * `appendClientTransformer` | |
156 | * `getClientTransformers` | |
157 | * `resetClientTransformers` | |
158 | * `prependNormTransformer` | |
159 | * `appendNormTransformer` | |
160 | * `getNormTransformers` | |
161 | * `resetNormTransformers` | |
162 | * deprecated the option "validation_constraint" in favor of the new | |
163 | option "constraints" | |
164 | * removed superfluous methods from DataMapperInterface | |
165 | * `mapFormToData` | |
166 | * `mapDataToForm` | |
167 | * added `setDefaultOptions` to FormTypeInterface and FormTypeExtensionInterface | |
168 | which accepts an OptionsResolverInterface instance | |
169 | * deprecated the methods `getDefaultOptions` and `getAllowedOptionValues` | |
170 | in FormTypeInterface and FormTypeExtensionInterface | |
171 | * options passed during construction can now be accessed from FormConfigInterface | |
172 | * added FormBuilderInterface and FormConfigEditorInterface | |
173 | * [BC BREAK] the method `buildForm` in FormTypeInterface and FormTypeExtensionInterface | |
174 | now receives a FormBuilderInterface instead of a FormBuilder instance | |
175 | * [BC BREAK] the method `buildViewBottomUp` was renamed to `finishView` in | |
176 | FormTypeInterface and FormTypeExtensionInterface | |
177 | * [BC BREAK] the options array is now passed as last argument of the | |
178 | methods | |
179 | * `buildView` | |
180 | * `finishView` | |
181 | in FormTypeInterface and FormTypeExtensionInterface | |
182 | * [BC BREAK] no options are passed to `getParent` of FormTypeInterface anymore | |
183 | * deprecated DataEvent and FilterDataEvent in favor of the new FormEvent which is | |
184 | now passed to all events thrown by the component | |
185 | * FormEvents::BIND now replaces FormEvents::BIND_NORM_DATA | |
186 | * FormEvents::PRE_SET_DATA now replaces FormEvents::SET_DATA | |
187 | * FormEvents::PRE_BIND now replaces FormEvents::BIND_CLIENT_DATA | |
188 | * deprecated FormEvents::SET_DATA, FormEvents::BIND_CLIENT_DATA and | |
189 | FormEvents::BIND_NORM_DATA | |
190 | * [BC BREAK] reversed the order of the first two arguments to `createNamed` | |
191 | and `createNamedBuilder` in `FormFactoryInterface` | |
192 | * deprecated `getChildren` in Form and FormBuilder in favor of `all` | |
193 | * deprecated `hasChildren` in Form and FormBuilder in favor of `count` | |
194 | * FormBuilder now implements \IteratorAggregate | |
195 | * [BC BREAK] compound forms now always need a data mapper | |
196 | * FormBuilder now maintains the order when explicitly adding form builders as children | |
197 | * ChoiceType now doesn't add the empty value anymore if the choices already contain an empty element | |
198 | * DateType, TimeType and DateTimeType now show empty values again if not required | |
199 | * [BC BREAK] fixed rendering of errors for DateType, BirthdayType and similar ones | |
200 | * [BC BREAK] fixed: form constraints are only validated if they belong to the validated group | |
201 | * deprecated `bindRequest` in `Form` and replaced it by a listener to FormEvents::PRE_BIND | |
202 | * fixed: the "data" option supersedes default values from the model | |
203 | * changed DateType to refer to the "format" option for calculating the year and day choices instead | |
204 | of padding them automatically | |
205 | * [BC BREAK] DateType defaults to the format "yyyy-MM-dd" now if the widget is | |
206 | "single_text", in order to support the HTML 5 date field out of the box | |
207 | * added the option "format" to DateTimeType | |
208 | * [BC BREAK] DateTimeType now outputs RFC 3339 dates by default, as generated and | |
209 | consumed by HTML5 browsers, if the widget is "single_text" | |
210 | * deprecated the options "data_timezone" and "user_timezone" in DateType, DateTimeType and TimeType | |
211 | and renamed them to "model_timezone" and "view_timezone" | |
212 | * fixed: TransformationFailedExceptions thrown in the model transformer are now caught by the form | |
213 | * added FormRegistryInterface, ResolvedFormTypeInterface and ResolvedFormTypeFactoryInterface | |
214 | * deprecated FormFactory methods | |
215 | * `addType` | |
216 | * `hasType` | |
217 | * `getType` | |
218 | * [BC BREAK] FormFactory now expects a FormRegistryInterface and a ResolvedFormTypeFactoryInterface as constructor argument | |
219 | * [BC BREAK] The method `createBuilder` in FormTypeInterface is not supported anymore for performance reasons | |
220 | * [BC BREAK] Removed `setTypes` from FormBuilder | |
221 | * deprecated AbstractType methods | |
222 | * `getExtensions` | |
223 | * `setExtensions` | |
224 | * ChoiceType now caches its created choice lists to improve performance | |
225 | * [BC BREAK] Rows of a collection field cannot be themed individually anymore. All rows in the collection | |
226 | field now have the same block names, which contains "entry" where it previously contained the row index. | |
227 | * [BC BREAK] When registering a type through the DI extension, the tag alias has to match the actual type name. | |
228 | * added FormRendererInterface, FormRendererEngineInterface and implementations of these interfaces | |
229 | * [BC BREAK] removed the following methods from FormUtil: | |
230 | * `toArrayKey` | |
231 | * `toArrayKeys` | |
232 | * `isChoiceGroup` | |
233 | * `isChoiceSelected` | |
234 | * [BC BREAK] renamed method `renderBlock` in FormHelper to `block` and changed its signature | |
235 | * made FormView properties public and deprecated their accessor methods | |
236 | * made the normalized data of a form accessible in the template through the variable "form.vars.data" | |
237 | * made the original data of a choice accessible in the template through the property "choice.data" | |
238 | * added convenience class Forms and FormFactoryBuilderInterface |