You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -278,6 +278,40 @@ public function configureOptions(OptionsResolver $resolver)
278
278
'text',
279
279
'choice',
280
280
));
281
+
282
+
$resolver->setDeprecated('date_format', function (Options$options, $dateFormat) {
283
+
if (null !== $dateFormat && 'single_text' === $options['widget']) {
284
+
returnsprintf('Using the "date_format" option of the %s when the "widget" option is set to "single_text" is deprecated since Symfony 4.2 and will lead to an exception in 5.0.', self::class);
285
+
//throw new LogicException(sprintf('Cannot use the "date_format" option of the %s when the "widget" option is set to "single_text".', self::class));
286
+
}
287
+
288
+
return'';
289
+
});
290
+
291
+
$resolver->setDeprecated('date_format', function (Options$options, $dateFormat) {
292
+
if (null !== $dateFormat && 'single_text' === $options['widget']) {
293
+
returnsprintf('Using the "date_format" option of the %s when the "widget" option is set to "single_text" is deprecated since Symfony 4.2 and will lead to an exception in 5.0.', self::class);
294
+
//throw new LogicException(sprintf('Cannot use the "date_format" option of the %s when the "widget" option is set to "single_text".', self::class));
295
+
}
296
+
297
+
return'';
298
+
});
299
+
$resolver->setDeprecated('date_widget', function (Options$options, $dateWidget) {
300
+
if (null !== $dateWidget && 'single_text' === $options['widget']) {
301
+
returnsprintf('Using the "date_widget" option of the %s when the "widget" option is set to "single_text" is deprecated since Symfony 4.2 and will lead to an exception in 5.0.', self::class);
302
+
//throw new LogicException(sprintf('Cannot use the "date_widget" option of the %s when the "widget" option is set to "single_text".', self::class));
303
+
}
304
+
305
+
return'';
306
+
});
307
+
$resolver->setDeprecated('time_widget', function (Options$options, $timeWidget) {
308
+
if (null !== $timeWidget && 'single_text' === $options['widget']) {
309
+
returnsprintf('Using the "time_widget" option of the %s when the "widget" option is set to "single_text" is deprecated since Symfony 4.2 and will lead to an exception in 5.0.', self::class);
310
+
//throw new LogicException(sprintf('Cannot use the "time_widget" option of the %s when the "widget" option is set to "single_text".', self::class));
0 commit comments