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/tests/Symfony/Tests/Component
Fabien Potencier be2e67c1ab merged branch bschussek/issue3288 (PR #3290)
Commits
-------

22c8f80 [Form] Fixed issues mentioned in the PR comments
3b1b570 [Form] Fixed: The "date", "time" and "datetime" types can be initialized with \DateTime objects
88ef52d [Form] Improved FormType::getDefaultOptions() to see default options defined in parent types
b9facfc [Form] Removed undefined variables in exception constructor

Discussion
----------

[Form] Fixed: "date", "time" and "datetime" fields can be initialized with \DateTime objects

Bug fix: yes
Feature addition: yes
Backwards compatibility break: **yes**
Symfony2 tests pass: yes
Fixes the following tickets: #3288
Todo: -

![Travis Build Status](https://secure.travis-ci.org/bschussek/symfony.png?branch=issue3288)

Fixed exception that was thrown when doing:

    $builder->add('createdAt', 'date', array('data' => new \DateTime()));

On a side note, the options passed to `FieldType::getDefaultOptions` now always also contain the default options of any parent types. This is necessary if you want to be independent of how `getDefaultOptions` is implemented in the parent type and still rely on the already defined values.

As a result, `FieldType::getParent` doesn't see default options anymore. This shouldn't be a big problem, because this method only relies on options in few cases. If it does, options now need to be checked for existence with `isset` before being used (BC break).

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

by bschussek at 2012-02-09T16:14:46Z

@fabpot Ready to merge.

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

by bschussek at 2012-02-10T12:15:04Z

@fabpot Ready to merge
2012-02-10 13:16:49 +01:00
..
BrowserKit [BrowserKit] first attempt at fixing CookieJar (closes #2209) 2011-12-31 16:32:51 +01:00
ClassLoader [ClassLoader] Added a class map file generator utility 2012-02-04 13:48:25 +01:00
Config [Tests] Use proper assertion for counting 2011-12-19 10:00:41 +01:00
Console [Console] Fix tests on windows 2012-01-09 17:05:16 +01:00
CssSelector [DoctrineBridge] fixed some CS 2011-12-13 10:22:12 +01:00
DependencyInjection merged 2.0 2012-02-04 08:03:45 +01:00
DomCrawler fixed CS, phpdoc, removed unused use statements 2012-01-28 18:02:36 +01:00
EventDispatcher [CS] Fix usage of assertCount 2012-01-18 14:42:47 +01:00
Finder [Finder] added a convenience method Finder::create() 2011-06-14 14:18:24 +02:00
Form merged branch bschussek/issue3288 (PR #3290) 2012-02-10 13:16:49 +01:00
HttpFoundation Make method non static 2012-01-25 14:56:27 +01:00
HttpKernel merged 2.0 2012-02-04 08:03:45 +01:00
Locale [Locale][Testing] Fixed breaking tests if 'intl' extension is not installed (#3139) 2012-01-17 18:44:55 +01:00
Process merged 2.0 2011-12-20 20:16:39 +01:00
Routing Added RouteCollectionTest#testAddCollectionOverridesDefaultsAndRequirements 2012-02-01 21:10:50 -08:00
Security allow unsetting parentAcl on MutableAclInterface 2012-01-30 14:16:44 +01:00
Serializer [Serializer] fixed unit tests after previous merge + added a new one 2012-01-22 10:20:46 +01:00
Templating [Templating] fixed 'scheme://' not detected as absolute path 2011-12-08 15:42:21 +01:00
Translation [Translation] Po/MoFileLoader parse plurization rules 2012-01-03 18:44:44 +01:00
Validator merged branch blogsh/dynamic_group_sequence (PR #3199) 2012-02-09 13:39:47 +01:00
Yaml merged 2.0 2011-12-18 14:48:17 +01:00