0

Code was working well before symfony update. Code includes time fileds in form with timezone settings.

$builder
 ->add('timeTo','time',array(
                'model_timezone'=>'UTC',
                'view_timezone'=>$options['user_timezone']
            ))

After updating symfony via composer from version 2.5.5 to 2.6.1, suddnetly i'll get Error 500 with message:

"The options "model_timezone", "view_timezone" do not exist. Known options are: ...(and so on)"

Documentation shows that model_timezone and view_timezone are not deprecated options for datetime form field in version 2.6.

What happened and how to fix it ?

Kpihus
  • 179
  • 2
  • 18

1 Answers1

2

This is a huge Backwards Compatibility break in Symfony. These options were suddently removed from 2.6, without previous deprecation or documentation update. I've reported this to the symfony team.

You should remove the options from the configuration. UTC is now used everywhere and you have to compare timezone differences yourself. (see this answer for an example: https://stackoverflow.com/a/2505687/1149495)

Community
  • 1
  • 1
Wouter J
  • 41,455
  • 15
  • 107
  • 112