Ensure there is a session before getting the session id
[ClassCollectionLoader] fixed comment striping on classes in global namespace
[Form] Output a more usable error when PropertyPath has tried to find adders and getters, but failed to find them
merged branch SamsonIT/error_explaining_lack_of_adder_remover (PR #4777)

Commits
-------

1fa22d9 [Form] Output a more usable error when PropertyPath has tried to find adders and getters, but failed to find them

Discussion
----------

[Form] Output a more usable error when PropertyPath has tried to find ad...

...ders and getters, but failed to find them

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

I've refactored the writeProperty method of propertypath in order to supply a better error message when writing has failed.

The writeProperty method itself now finds singulars (if a singular was not passed) for the private findAdderAndRemover method which allowed for some duplicate code to be removed and since the writeProperty now holds this data, it can provide a more verbose exception message.

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

by bschussek at 2012-07-09T13:54:35Z

Apart from the typo this PR looks good.

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

by Burgov at 2012-07-09T14:01:04Z

fixed&squashed
merged branch bamarni/master (PR #4792)

Commits
-------

6c9c2ec [ClassCollectionLoader] fixed comment striping on classes in global namespace

Discussion
----------

[ClassCollectionLoader] fixed comment striping on classes in global namespace

Comments aren't striped when the class is in the global namespace, this adds a fake namespace to let the fixNamespaceDeclaration method handling the formating, so we can remove a method.

I've also put dev as minimum policy in composer, otherwise I couldn't install dependencies.
merged branch frosas/start-session-on-generate-csrf-token (PR #4781)

Commits
-------

6d94f3e Ensure there is a session before getting the session id

Discussion
----------

[Form] Ensure there is a session before getting the session id

Solves "The CSRF token is invalid. Please try to resubmit the form" error when a form is generated before the session is started.

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

by fabpot at 2012-07-09T10:23:32Z

Adding a CSRF token only makes sense if you are on a page with a "user". If not (and if you don't use HTTP auth or whatever), then there is no need for a CSRF token.

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

by frosas at 2012-07-09T14:42:40Z

This PR doesn't change any logic on whether a CSRF token is added or not, it just fixes a bug when a token is requested.
[Form] Fixed: ChoiceType omits the "empty_value" option if the choices contain an empty element
merged branch bschussek/issue3864 (PR #4801)

Commits
-------

040ba8f [Form] Fixed: ChoiceType omits the "empty_value" option if the choices contain an empty element

Discussion
----------

[Form] Fixed: ChoiceType omits the "empty_value" option if the choices contain an empty element

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