This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component
Fabien Potencier 9153f1980d merged branch jakzal/date-type-fix (PR #6543)
This PR was merged into the 2.1 branch.

Commits
-------

6c5e615 [Form] Fixed DateType when used with the intl extension disabled.

Discussion
----------

[Form] Fixed DateType when used with the intl extension disabled

DateType's month select box returns timestamps when used with intl extension disabled (see #6485).

The reason for this is that stubbed formats use *L* instead of *M* for month representation. My fix is simply taking this into account when building array for the select box.

I didn't provide unit tests since they're disabled when intl extension is not enabled. I've only manually verified if the months array contains correct data.

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6485
Todo: -
License of the code: MIT
Documentation PR: -

---------------------------------------------------------------------------

by bschussek at 2013-01-03T17:41:47Z

Doesn't this call for fixing the stub instead of changing the Form component?

---------------------------------------------------------------------------

by stof at 2013-01-03T17:50:49Z

@bschussek L and M are both valid for the month in Intl

---------------------------------------------------------------------------

by jakzal at 2013-01-03T17:52:41Z

[StubIntlDateFormatter uses FullTransformer](https://github.com/symfony/symfony/blob/2.1/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php#L206) to format the date. [FullTransformer supports both *L* and *M*](https://github.com/symfony/symfony/blob/2.1/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php#L50) formats. Both formats are treated interchangeably.
2013-01-03 20:25:35 +01:00
..
BrowserKit Removed useless branch alias for dev-master in composer.json 2012-12-06 11:00:55 +01:00
ClassLoader Removed useless branch alias for dev-master in composer.json 2012-12-06 11:00:55 +01:00
Config fixed CS 2012-12-11 11:40:22 +01:00
Console [Console] Add support for parsing terminal width/height on localized windows, fixes #5742 2012-12-13 18:42:00 +01:00
CssSelector Merge branch '2.0' into 2.1 2012-12-11 11:33:11 +01:00
DependencyInjection Removed useless branch alias for dev-master in composer.json 2012-12-06 11:00:55 +01:00
DomCrawler Removed useless branch alias for dev-master in composer.json 2012-12-06 11:00:55 +01:00
EventDispatcher Fixed php doc of GenericEvent::__construct 2012-12-27 09:21:49 +01:00
Filesystem fixed CS 2012-12-11 11:40:22 +01:00
Finder Revert "merged branch gajdaw/finder_splfileinfo_fpassthu (PR #4751)" (closes #6224) 2012-12-10 13:46:54 +01:00
Form merged branch jakzal/date-type-fix (PR #6543) 2013-01-03 20:25:35 +01:00
HttpFoundation [HttpFoundation] fix return types and handling of zero in Response 2013-01-02 22:06:26 +01:00
HttpKernel bumped Symfony version to 2.1.7-DEV 2012-12-21 11:42:20 +01:00
Locale [Locale] Fixed the StubLocaleTest for ICU versions lower than 4.8. 2012-12-29 20:05:26 +01:00
OptionsResolver Removed useless branch alias for dev-master in composer.json 2012-12-06 11:00:55 +01:00
Process [Process] Prevented test from failing when pcntl extension is not enabled. 2012-12-30 13:18:39 +01:00
Routing fixed CS 2012-12-11 11:40:22 +01:00
Security merged branch dbu/2.1-requestmatcher-httputils (PR #6470) 2013-01-02 10:30:52 +01:00
Serializer - Test undefined index # 2012-12-12 18:17:16 +01:00
Templating Removed useless branch alias for dev-master in composer.json 2012-12-06 11:00:55 +01:00
Translation Removed useless branch alias for dev-master in composer.json 2012-12-06 11:00:55 +01:00
Validator Fixed missing plural message in portuguese validator 2013-01-02 16:51:06 +01:00
Yaml Removed useless branch alias for dev-master in composer.json 2012-12-06 11:00:55 +01:00