symfony/symfony — pull request #6153 by mweimerskirch (2012-11-29 20:52:06+00:00)
Title: Cosmetic fix: Removed unnecessary attribute with default value from template

"1" is the default value of the "size" attribute for the "select" tag, so it is not necessary (=no backwards compatibility break).

Applying this patch makes it easier to work with bootstrap, because bootstrap includes a selector that checks it the "size" attribute is present: https://github.com/twitter/bootstrap/blob/master/less/forms.less#L172

I noticed the problem when working with the Sonata AdminBundle:

Before this patch: http://d.pr/i/Ejir
After this patch: http://d.pr/i/Vruq

The date and time fields in Sonata were not aligned because the CSS code between date and time fields was different (the size attribute is not present on date fields, only on time fields), so different CSS code was applied.