fixed @expectedException class names
fixed some typos
minor #9603 Fixed some typos (fabpot)

This PR was merged into the 2.2 branch.

Discussion
----------

Fixed some typos

Commits
-------

5c6edb3 fixed some typos
8d69bb5 fixed @expectedException class names
When getting the session's id, check if the session is not closed

This introduced a regression from #9246, with an incomplete fix ;
As the `started` flag on the NativeSessionStorage was not `true`
anymore when saving the session, the session id was always empty
when saving it, and thus when sending the `PHPSESSID` cookie
bug #9625 [HttpFoundation] Do not return an empty session id if the session was closed (Taluu)

This PR was merged into the 2.2 branch.

Discussion
----------

[HttpFoundation] Do not return an empty session id if the session was closed

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7936
| License       | MIT
| Doc PR        | ~

A regression from the bug fix #9246 was introduced due to an incomplete fix ;

As the `started` flag on the NativeSessionStorage was not `true` anymore when saving the session, the session id was always empty when saving it, and thus when sending the `PHPSESSID` cookie.

The previous PR I made (#9530) was another approach to solve this regression, but this one should keep the fix made by @tecbot on #9246, and finish it with another verification. I may miss another place where `started` is used, but I don't really see which other conditions depending on this property should be altered...

**Note : this is #9611 rebased on 2.2**

This should be mergeable.

Commits
-------

5b9a727 When getting the session's id, check if the session is not closed
Fixed the registration of validation.xml file when the form is disabled
bug #9443 [FrameworkBundle] Fixed the registration of validation.xml file when the form is disabled (hason)

This PR was submitted for the 2.1 branch but it was merged into the 2.2 branch instead (closes #9443).

Discussion
----------

[FrameworkBundle] Fixed the registration of validation.xml file when the form is disabled

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

cfa5aa5 [FrameworkBundle] Fixed the registration of validation.xml file when the form is disabled
Fix DateType for 32bits computers.
bug #9314 [Form] Fix DateType for 32bits computers. (WedgeSama)

This PR was squashed before being merged into the 2.2 branch (closes #9314).

Discussion
----------

[Form] Fix DateType for 32bits computers.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #5227,#5554
| License       | MIT
| Doc PR        | -

Fix an issue due to 32bits machines, date can be only between 1902-2037.
Simply not add date if false. Can be good to add this to 2.3 and master too.

Commits
-------

b80fb43 [Form] Fix DateType for 32bits computers.
Modified guessDefaultEscapingStrategy to not escape txt templates

Useful for plaintext emails.
bug #9639 Modified guessDefaultEscapingStrategy to not escape txt templates (fabpot)

This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9639).

Discussion
----------

Modified guessDefaultEscapingStrategy to not escape txt templates

This PR was submitted on the symfony/TwigBundle read-only repository and moved automatically to the main Symfony repository (closes symfony/TwigBundle#2).

Useful for plaintext emails.

Commits
-------

6affe94 Modified guessDefaultEscapingStrategy to not escape txt templates
Teardown used wrong property
minor #9640 Fixed wrong property in test teardown (fabpot)

This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9640).

Discussion
----------

Fixed wrong property in test teardown

This PR was submitted on the symfony/EventDispatcher read-only repository and moved automatically to the main Symfony repository (closes symfony/EventDispatcher#2).

Commits
-------

5330603 Teardown used wrong property
[WebProfilerBundle] Fixed js escaping in time.html.twig
bug #9643 [WebProfilerBundle] Fixed js escaping in time.html.twig (hason)

This PR was merged into the 2.2 branch.

Discussion
----------

[WebProfilerBundle] Fixed js escaping in time.html.twig

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

For some event names I received the JavaScript error: ```Uncaught SyntaxError: Unexpected token ILLEGAL```

Commits
-------

4828350 [WebProfilerBundle] Fixed js escaping in time.html.twig
use the correct class name to retrieve mapped class' metadata and repository
Fix `extract` method to avoid recalculating count() for each iteration.

Cache the value of `count($attributes)` to avoid recalculating it for each iteration of the loop.

Since this count will never change during the method execution, this change make the code a bit more efficient.
minor #9651 Fix `extract` method to avoid recalculating count() for each iteration. (fabpot)

This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #9651).

Discussion
----------

Fix `extract` method to avoid recalculating count() for each iteration.

This PR was submitted on the symfony/DomCrawler read-only repository and moved automatically to the main Symfony repository (closes symfony/DomCrawler#16).

Cache the value of `count($attributes)` to avoid recalculating it for each iteration of the loop.

Since this count will never change during the method execution, this change make the code a bit more efficient.

Commits
-------

9ababf4 Fix `extract` method to avoid recalculating count() for each iteration.
bug #9647 use the correct class name to retrieve mapped class' metadata and reposi... (xabbuh)

This PR was merged into the 2.2 branch.

Discussion
----------

use the correct class name to retrieve mapped class' metadata and reposi...

...tory

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #9646
| License       | MIT
| Doc PR        |

The validation context isn't necessarily the entity being validated. In case that you added the Unique Entity constraint inside your custom type via the ``constraints`` option the validation context will be the ``Form`` class itself. Thus, not the validation context should be used to get the class metadata and the repository of the validated entity, but the entity itself should be used.

Commits
-------

cd4df11 use the correct class name to retrieve mapped class' metadata and repository
[DoctrineBridge] normalized class names in the ORM type guesser