Commits
-------
a30f4a0 [Form] cleanup
Discussion
----------
[Form] cleanup
---------------------------------------------------------------------------
by travisbot at 2012-05-27T19:47:21Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1450050) (merged 09574f4b into adf07f1e).
---------------------------------------------------------------------------
by travisbot at 2012-05-27T19:57:42Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1450149) (merged a8c63d72 into adf07f1e).
---------------------------------------------------------------------------
by vicb at 2012-05-27T20:00:13Z
thanks a bunch @travisbot !
---------------------------------------------------------------------------
by travisbot at 2012-05-28T06:52:52Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1453555) (merged a30f4a03 into adf07f1e).
---------------------------------------------------------------------------
by bschussek at 2012-05-28T09:20:05Z
Thank you Victor! 👍
Commits
-------
59c4f55 a few minor changes
Discussion
----------
a few minor changes / cleanup
---------------------------------------------------------------------------
by travisbot at 2012-05-27T07:58:52Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1446431) (merged bb7ae326 into 9e951991).
Commits
-------
fc38e2b [Form] Fixed mapping of violations with empty paths to the root form
Discussion
----------
[Form] Fixed mapping of violations with empty paths to the root form
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
---------------------------------------------------------------------------
by travisbot at 2012-05-27T12:57:36Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1447769) (merged fc38e2b4 into adf07f1e).
Commits
-------
d549493 [WebProfilerBundle] Fix time panel for fr locale (fix#4437)
Discussion
----------
[WebProfilerBundle] Fix time panel for fr locale (fix#4437)
@Vincent-P could you confirm if this commit fixes your issues , Thanks.
---------------------------------------------------------------------------
by travisbot at 2012-05-28T12:39:05Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1455324) (merged d5494936 into adf07f1e).
Commits
-------
d046fed [HttpFoundation] Remove temporary files after tests run
Discussion
----------
[HttpFoundation] Remove temporary files after tests run
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [yes|no]
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
---------------------------------------------------------------------------
by travisbot at 2012-05-28T00:26:30Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1451809) (merged 30082e97 into adf07f1e).
---------------------------------------------------------------------------
by travisbot at 2012-05-28T06:59:39Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1453569) (merged d046fede into adf07f1e).
Commits
-------
395004c [Bridge][Doctrine] Fix missing dot in unique entity error message
Discussion
----------
[Bridge][Doctrine] Fix missing dot in unique entity error message
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: none
Todo: none
License of the code: MIT
Documentation PR: none
The translation message defined in the FrameworkExtraBundle defines the unique entity error message like that: ``This value is already used.`` but is defined without the dot in the Doctrine UniqueEntity validator. This PR fixes this issue.
---------------------------------------------------------------------------
by travisbot at 2012-05-29T12:31:59Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1464732) (merged 675c744c into adf07f1e).
---------------------------------------------------------------------------
by travisbot at 2012-05-29T14:24:48Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1465598) (merged 395004c0 into adf07f1e).
Commits
-------
face1f1 Add 5.3.3 to Travis, now is available.
Discussion
----------
Add 5.3.3 to Travis, now is available.
---------------------------------------------------------------------------
by travisbot at 2012-05-28T12:41:45Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1455374) (merged face1f1b into cc42a187).
---------------------------------------------------------------------------
by fabpot at 2012-05-28T14:03:29Z
The minimum PHP version has been changed for Symfony 2.1, not for 2.0.
---------------------------------------------------------------------------
by vicb at 2012-05-28T14:29:37Z
but 5.3.2 is not available on travis, @Maks3w right ?
---------------------------------------------------------------------------
by Maks3w at 2012-05-28T14:33:05Z
@vicb 5.3.2 is not available on Travis.
@fabpot Then you can merge #4439, it's the same but for master
---------------------------------------------------------------------------
by vicb at 2012-05-28T14:43:33Z
why not keep 5.3.3 for 2.0 also (closer to 5.3.2 than just 5.3 which is 5.3.13 - best we can do).
Commits
-------
3ad01c0 Update src/Symfony/Bundle/FrameworkBundle/EventListener/TestSessionListener.php
Discussion
----------
Fix broken web test cases with session already started
This PR fixes the issues highlighted in PR #4445 and #3741 by not overriding the session id if the session is already started.
---------------------------------------------------------------------------
by travisbot at 2012-05-29T19:06:33Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1468970) (merged 3ad01c05 into adf07f1e).
---------------------------------------------------------------------------
by stloyd at 2012-05-29T19:07:54Z
Look at #2040. It's quite old, but there is at least some "reason" =)
---------------------------------------------------------------------------
by guilhermeblanco at 2012-05-29T20:57:27Z
@stloyd it seems to me that doing a session_id() (and now as $session->setId()) is still wrong.
The right should be a regeneration of the id then, which would still make my code pass. The problem is that setId method checks for a possible regeneration/double attribution, which prevents an already started session (from a WebTestCase) to live peacefully with the TestSessionListener, because it will always try to set an id.
So either we allow to regenerate ids or this code is not only useless for 2.1, but actually broken.
---------------------------------------------------------------------------
by drak at 2012-05-30T02:42:47Z
@guilhermeblanco - When I was doing the session refactoring I wanted to make exactly the patch this PR now but I didnt because I wast sure if there were reasons I was unaware of. @fabpot - I would merge this PR if it fixes the related tickets.
Commits
-------
09e5f46 fix markdown for code
Discussion
----------
fix markdown for code in UPGRADE-2.1.md
---------------------------------------------------------------------------
by travisbot at 2012-05-25T12:20:04Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1432391) (merged 09e5f462 into 023dbf80).
---------------------------------------------------------------------------
by jaugustin at 2012-05-25T12:22:13Z
great I didn't break anything :D
Commits
-------
8308aea [Config] added EnumNode
Discussion
----------
[Config] added EnumNode
This adds an EnumNode which should be used instead of a Closure and manual validation.
The benefit is that you can retrieve the allowed values. It is also a bit shorter, but that is not the main point here.
---------------------------------------------------------------------------
by travisbot at 2012-05-26T03:52:50Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1439264) (merged 8308aea9 into ff4d446c).
Commits
-------
b4e2818 [Form] Using new methods instead of the deprecated
Discussion
----------
[Form] Using new methods instead of the deprecated
---------------------------------------------------------------------------
by travisbot at 2012-05-25T21:05:11Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1436891) (merged b4e28186 into ff4d446c).
Commits
-------
c688166 [Form] fixing form type translation_domain inheritance fixed bug with parent property fix is_required field fixed subform translation_domain inheritance some translation_domain inheritance code refactoring added form type translation_domain inheritance tests changed methods place in form type test changed arguments in createNamed method call in FormTypeTest
Discussion
----------
FormType translation_domain inheritance
Fixes: #3286, #3872, #3938
I found bug in form type parameters inheritance. It's better to inherit some child form element options from parent: translation_domain, required.
---------------------------------------------------------------------------
by travisbot at 2012-05-18T13:11:45Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1366275) (merged afc32247 into 1e15f210).
---------------------------------------------------------------------------
by travisbot at 2012-05-18T13:14:46Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1366288) (merged 1794dc79 into 1e15f210).
---------------------------------------------------------------------------
by travisbot at 2012-05-18T13:54:41Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1366673) (merged 2f5d0377 into 1e15f210).
---------------------------------------------------------------------------
by travisbot at 2012-05-18T14:53:58Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1367306) (merged a4027f38 into 1e15f210).
---------------------------------------------------------------------------
by bschussek at 2012-05-20T14:55:14Z
This PR has a few outstanding issues and is missing some tests (check read_only tests in FormTypeTest). Otherwise this looks good.
---------------------------------------------------------------------------
by travisbot at 2012-05-22T04:48:47Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1396892) (merged 68534d7e into 1e15f210).
---------------------------------------------------------------------------
by bschussek at 2012-05-22T07:36:47Z
Looks good. Could you please squash your commits into one commit (git rebase -i) and add the prefix "[Form]" to the message of that commit?
---------------------------------------------------------------------------
by zerkalica at 2012-05-22T09:36:33Z
Ok, but how to push rebased branch ? Use forced push (git push origin :master) or make new branch and new pull request ?
---------------------------------------------------------------------------
by bschussek at 2012-05-22T09:43:15Z
git push -f origin master
---------------------------------------------------------------------------
by travisbot at 2012-05-22T09:53:13Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1398573) (merged 05a57095 into e4e3ce6c).
---------------------------------------------------------------------------
by bschussek at 2012-05-22T09:56:29Z
Could you please add a test to FormTypeTest to verify that this actually works? The test already contains tests for the "read_only" functionality that can serve you as template.
---------------------------------------------------------------------------
by bschussek at 2012-05-25T06:26:26Z
You need to rebase the branch on symfony master so that it becomes mergable:
git rebase symfony/master
Also, please squash the 8 commits into one.
---------------------------------------------------------------------------
by travisbot at 2012-05-25T17:23:01Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1435037) (merged 57ee25a1 into ff4d446c).
fixed bug with parent property
fix is_required field
fixed subform translation_domain inheritance
some translation_domain inheritance code refactoring
added form type translation_domain inheritance tests
changed methods place in form type test
changed arguments in createNamed method call in FormTypeTest
Commits
-------
8c23d7f [Form] Fixed: "error_mapping" is not an attribute anymore, but an option
Discussion
----------
[Form] Fixed: "error_mapping" is not an attribute anymore, but an option
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4411
Todo: -
---------------------------------------------------------------------------
by craue at 2012-05-25T14:56:34Z
👍
---------------------------------------------------------------------------
by travisbot at 2012-05-25T14:58:41Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1433732) (merged 8c23d7fd into 023dbf80).
Commits
-------
bc15e2d [Form] Some code cleanup
94f6f77 Restructured Form section of UPGRADE
3d800af [Form] Remove usages of deprecated features
ee803cd [Form] Renamed setVars() to addVars() in FormViewInterface
1c4f632 [Form] Fixed API docs and usage of FormBuilderInterface instead of FormBuilder
2e6cdd1 [Form] Inverted the logic of "single_control" and renamed it to "compound". The opposite is now "simple".
98a7c0c [Form] Consolidated FormInterface, FormBuilderInterface and FormViewInterface
8e128fc [Form][OptionsResolver] Fixed typos
877d8f7 [Form] Reversed the order of $type and $name in FormFactory::createNamed[Builder]()
33fecca [Form] Merged various form events and added class FormEvent
bec8015 [Form] Renamed client and application format to view and model format
8cae328 [Form] setDefaultOptions() is now coded against OptionsResolverInterface
1ecddbc [OptionsResolver] Renamed recommended method to setDefaultOptions()
dc2fa9d [OptionsResolver] Added OptionsResolverInterface
2cd99e8 [Form] Added FormBuilderInterface and FormViewInterface and cleaned up FormTypeInterface and FormTypeExtensionInterface
0ef4066 [Form] Options are now passed to buildView() and buildViewBottomUp()
027259e [Form] Changed getDefaultOptions() to setDefaultOptions(OptionsResolver $resolver) in FormTypeInterface
b4e8bcf [OptionsResolver] Relaxed tests to check that allowed values can also be passed as scalars
97de004 [OptionsResolver] Added option type validation capabilities
0af5f06 [OptionsResolver] Added method setFilters() for augmenting the final option values
Discussion
----------
[Form] Cleaned up the Form API
Bug fix: no
Feature addition: no
Backwards compatibility break: **YES**
Symfony2 tests pass: yes
Fixes the following tickets: #3855, #3879, #4342, #4371, #4375
Todo: -
This PR cleans up the Form API as described in the referenced tickets in order to stabilize and freeze this API in the future. BC is kept wherever possible. After this PR, form types are expected to follow the following interface:
```php
<?php
class MyType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
}
public function buildView(FormViewInterface $view, FormInterface $form, array $options)
{
}
public function finishView(FormViewInterface $view, FormInterface $form, array $options)
{
}
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
}
public function getParent()
{
return 'form';
}
public function getName()
{
return 'my_type';
}
}
```
Note that the options are now passed to `buildView` and `finishView` (formerly `buildViewBottomUp`) as well, reducing the need for creating form attributes in most cases.
---------------------------------------------------------------------------
by travisbot at 2012-05-23T19:07:44Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1414486) (merged 277f5f78 into e0238071).
---------------------------------------------------------------------------
by bschussek at 2012-05-23T19:51:40Z
The PR now also contains the fix for #4342.
---------------------------------------------------------------------------
by travisbot at 2012-05-23T19:51:55Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1414932) (merged 13d284ba into e0238071).
---------------------------------------------------------------------------
by travisbot at 2012-05-24T06:55:35Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1419776) (merged 5aba0778 into e0238071).
---------------------------------------------------------------------------
by travisbot at 2012-05-24T06:56:28Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1419783) (merged 00c4f7ee into b07fb3c4).
---------------------------------------------------------------------------
by travisbot at 2012-05-24T12:26:25Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1421748) (merged 73cd9f8e into b07fb3c4).
---------------------------------------------------------------------------
by bschussek at 2012-05-24T12:27:32Z
The FormView changes described in #4371 are now contained as well. Invitation for final review.
---------------------------------------------------------------------------
by travisbot at 2012-05-24T14:03:10Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1422116) (merged e1f502b9 into b07fb3c4).
---------------------------------------------------------------------------
by cordoval at 2012-05-25T03:26:05Z
any ETA @bschussek ? I want to use it for tackling the problem of dynamic selects city-state
here http://www.craftitonline.com/2011/08/symfony2-ajax-form-republish/
I am told:
"getDefaultOptions is changed to setDefaultOptions which will allow you to set depenedent values based on other forms"
so I am most interested +300!
---------------------------------------------------------------------------
by bschussek at 2012-05-25T06:08:53Z
@cordoval I think you misunderstood this. The OptionsResolver allows you to set options dependent on other options, but of the same field. Also, this is already possible before this merge by setting an option to a closure as described in the README of the OptionsResolver component.
---------------------------------------------------------------------------
by travisbot at 2012-05-25T06:35:53Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1430534) (merged b61cc555 into b07fb3c4).
---------------------------------------------------------------------------
by vicb at 2012-05-25T06:42:24Z
@bschussek great changes ! I have just sent you a PR with some modifs related to deprecated features. I'll rebase and submit the other one we have already discussed.
---------------------------------------------------------------------------
by travisbot at 2012-05-25T07:16:18Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1430699) (merged e18830da into b07fb3c4).
---------------------------------------------------------------------------
by cordoval at 2012-05-25T07:19:07Z
@bschussek what is already possilble @ "Also, this is already possible before"
I am confused could you link to what you are referring to please?
---------------------------------------------------------------------------
by travisbot at 2012-05-25T07:22:07Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1430727) (merged 20c02a72 into b07fb3c4).
---------------------------------------------------------------------------
by bschussek at 2012-05-25T07:22:29Z
```
public function getDefaultOptions()
{
return array(
'a' => 'foo',
'b' => function (Options $options) {
return 'bar' === $options['a'] ? 'x' : 'y';
}
);
}
---------------------------------------------------------------------------
by travisbot at 2012-05-25T10:38:04Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1431903) (merged bc15e2d6 into 45849ce3).