Late static factory method
[Security] Fix DocBlock of attemptAuthentication

Add Response as possible return type of the method because the method AbstractAuthenticationListener::handle() test if $returnValue is an instance of Response (line 148).
[Form] The properties of FormView are now accessed directly in order to increase performance (PHP +200ms, Twig +150ms)
[Form] Replace methods in ChoiceView by public properties (PHP +100ms, Twig +400ms)
[Form] Tweaked the generation of option tags for performance (PHP +200ms, Twig +50ms)
[Form] Moved the method isChoiceSelected() to the ChoiceView class (PHP +150ms)
[Form] Moved the access to templating helpers out of the choice loop for performance reasons (PHP +100ms)
[Form] Precalculated the closure for deciding whether a choice is selected (PHP +30ms, Twig +30ms)
[Form] Reduced the number of setData() calls by deferring a Form's initialization (+40ms)
[OptionsResolver] Renamed filters to normalizers
merged branch bschussek/filtertonormalizer (PR #5002)

Commits
-------

3075fa6 [OptionsResolver] Renamed filters to normalizers

Discussion
----------

[OptionsResolver] Renamed filters to normalizers

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

This PR fixes the naming to be in line with the Serializer component.
merged branch bschussek/setdata_performance (PR #5003)

Commits
-------

d4f4038 [Form] Reduced the number of setData() calls by deferring a Form's initialization (+40ms)

Discussion
----------

[Form] Reduced the number of setData() calls

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

This PR decreases the number of expensive `setData()` calls on `Form` instances by deferring the form's initialization with default data to the first call to a `get*Data()` method. If `setData()` is called manually before invoking `get*Data()`, the initialization with the default data will not take place.

Before:

```
$form = new Form($config); // implicit setData($config->getData());
$form->setData($object); // setData() is now called twice
```

After:

```
$form = new Form($config); // no implicit setData()
$form->getData(); // implicit setData($config->getData())

// or

$form = new Form($config);
$form->setData($object);
$form->getData(); // setData() was called only once
```
merged branch Slamdunk/hotfix/late-static-create (PR #4991)

Commits
-------

9dc2011 Late static factory method

Discussion
----------

Late static factory method

When using `Symfony\CS\Finder\DefaultFinder::create()`, we lose all `Symfony\CS\Finder\DefaultFinder::__construct()` properties because main `Finder` does not use late static binding.

This commit resolves the issue.
merged branch KaipiYann/Fix-DocBlock-attemptAuthentication (PR #4996)

Commits
-------

134cc84 [Security] Fix DocBlock of attemptAuthentication

Discussion
----------

[Security] Fix DocBlock of attemptAuthentication

Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo: -
License of the code: MIT
Documentation PR: -
[Form] Added a layer of 2.0 BC methods to FormView and updated UPGRADE and CHANGELOG
[Form] Turned Twig filters into tests
[Form] Fixed issues mentioned in the PR
merged branch bschussek/options_performance (PR #5004)

Commits
-------

24b764e [Form] Fixed issues mentioned in the PR
9216816 [Form] Turned Twig filters into tests
310f985 [Form] Added a layer of 2.0 BC methods to FormView and updated UPGRADE and CHANGELOG
5984b18 [Form] Precalculated the closure for deciding whether a choice is selected (PHP +30ms, Twig +30ms)
5dc3c39 [Form] Moved the access to templating helpers out of the choice loop for performance reasons (PHP +100ms)
0ef9acb [Form] Moved the method isChoiceSelected() to the ChoiceView class (PHP +150ms)
8b72766 [Form] Tweaked the generation of option tags for performance (PHP +200ms, Twig +50ms)
400c95b [Form] Replace methods in ChoiceView by public properties (PHP +100ms, Twig +400ms)
d072f35 [Form] The properties of FormView are now accessed directly in order to increase performance (PHP +200ms, Twig +150ms)

Discussion
----------

[Form] Made FormView and ChoiceView properties public for performance reasons

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

This PR changes the access to properties of `FormView` and `ChoiceView` objects from getters to direct property accesses. On [my example form](http://advancedform.gpserver.dk/app_dev.php/taxclasses/1) this improves rendering performance for **300ms** with PHP templates and **550ms** with Twig on my local machine.

Unfortunately, this breaks BC both with 2.0 and with the current master in Form Types and PHP templates. Twig templates are not affected by this change.

2.0:
```
$formView->set('my_var', 'foobar');
$formView->get('my_var');
$formView->getChild('childName');
$formView['childName'];
```

master:
```
$formView->setVar('my_var', 'foobar');
$formView->getVar('my_var');
$formView->get('childName');
$formView['childName'];
```

this PR:
```
$formView->vars['my_var'] = 'foobar';
$formView->vars['my_var'];
$formView->children['childName'];
$formView['childName'];
```

Should we add methods to keep BC with 2.0?

The second part of this PR contains improvements to the rendering of choice fields. These gain another **~500ms** for PHP templates and **80ms** for Twig. These improvements are BC, unless you overwrote the block "choice_widget_options" in your form themes which then needs to be adapted.

**Update:**

The PR now includes a BC layer for 2.0.

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

by stof at 2012-07-21T11:37:41Z

@bschussek couldn't we keep the getters and setters for BC even if the rendering accesses the public properties directly ?

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

by bschussek at 2012-07-21T11:52:33Z

@stof A BC layer for 2.0 is now included. People who upgraded to master already unfortunately need to adapt their code.

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

by sstok at 2012-07-21T12:40:57Z

:+1:
[HttpFoundation] never send a 304 for non-safe HTTP methods
Merge remote-tracking branch 'upstream/master'

* upstream/master:
  [HttpFoundation] never send a 304 for non-safe HTTP methods
  [Form] Fixed issues mentioned in the PR
  [Form] Turned Twig filters into tests
  [Form] Added a layer of 2.0 BC methods to FormView and updated UPGRADE and CHANGELOG
  [OptionsResolver] Renamed filters to normalizers
  [Form] Reduced the number of setData() calls by deferring a Form's initialization (+40ms)
  [Form] Precalculated the closure for deciding whether a choice is selected (PHP +30ms, Twig +30ms)
  [Form] Moved the access to templating helpers out of the choice loop for performance reasons (PHP +100ms)
  [Form] Moved the method isChoiceSelected() to the ChoiceView class (PHP +150ms)
  [Form] Tweaked the generation of option tags for performance (PHP +200ms, Twig +50ms)
  [Form] Replace methods in ChoiceView by public properties (PHP +100ms, Twig +400ms)
  [Form] The properties of FormView are now accessed directly in order to increase performance (PHP +200ms, Twig +150ms)
  [Security] Fix DocBlock of attemptAuthentication
  Late static factory method