CSRF warning docs on Request::enableHttpMethodParameterOverride()

[HttpFoundation] fixed the docs so that it gives some explanation about how you are vulnerable to CSRF when you enable the httpMethodeParameterOverride
[Form] fix form handling with unconventional request methods like OPTIONS
[Validator] Fixed Regex::getHtmlPattern() to work with complex and negated patterns
[Kernel] ensure session is saved before sending response
[Session] remove invalid workaround in session regenerate

The original issue #7380 was just caused because the developer missed to save the session before doing the redirect. That's all. This reverts #8270 and following.
improve error message for multiple documents

The YAML parser doesn't support multiple documents. This pull requests
improves the error message when the parser detects multiple YAML
documents.
[HttpFoundation] Minor spelling fix in PHPDocs
minor #12374 [HttpFoundation] Minor spelling fix in PHPDocs (GeertDD)

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

Discussion
----------

[HttpFoundation] Minor spelling fix in PHPDocs

| Q             | A
| ------------- | ---
| Fixed tickets |
| License       | MIT

Commits
-------

35791fd [HttpFoundation] Minor spelling fix in PHPDocs
[ClassLoader] Cast $useIncludePath property to boolean
minor #12371 [ClassLoader] Cast $useIncludePath property to boolean (GeertDD)

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

Discussion
----------

[ClassLoader] Cast $useIncludePath property to boolean

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

Commits
-------

32001a4 [ClassLoader] Cast $useIncludePath property to boolean
bug #12341 [Kernel] ensure session is saved before sending response (Tobion)

This PR was merged into the 2.3 branch.

Discussion
----------

[Kernel] ensure session is saved before sending response

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #6417, #7885
| License       | MIT
| Doc PR        | n/a

Saves the session, in case it is still open, before sending the response.

This ensures several things in case the developer did not save the session explicitly:

- If a session save handler without locking is used, it ensures the data is available
on the next request, e.g. after a redirect. PHPs auto-save at script end via
session_register_shutdown is executed after fastcgi_finish_request. So in this case
the data could be missing the next request because it might not be saved the moment
the new request is processed.

- A locking save handler (e.g. the native 'files') circumvents concurrency problems like
the one above. By saving the session before long-running things in the terminate event,
we ensure the session is not blocked longer than needed.

- When regenerating the session ID no locking is involved in PHPs session design. See
https://bugs.php.net/bug.php?id=61470 for a discussion. So in this case, the session must
be saved anyway before sending the headers with the new session ID. Otherwise session
data could get lost again for concurrent requests with the new ID. One result could be
that you get logged out after just logging in.

This listener should be executed as one of the last listeners, so that previous listeners
can still operate on the open session. This prevents the overhead of restarting it.
Listeners after closing the session can still work with the session as usual because
 Symfonys session implementation starts the session on demand. So writing to it after
it is saved will just restart it.

Commits
-------

b7bfef0 [Kernel] ensure session is saved before sending response
bug #12326 [Session] remove invalid hack in session regenerate (Tobion)

This PR was merged into the 2.3 branch.

Discussion
----------

[Session] remove invalid hack in session regenerate

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

The original issue #7380 was just caused because the developer missed to save the session before doing the redirect. That's all. Such mistakes won't happen anymore with #12341

This reverts #8270 and following. Also it makes absolutely no sense to do this only for the `files` save handler which creates huge inconsistencies. All save handlers are affected and it's more a documentation thing.

Commits
-------

703d906 [Session] remove invalid workaround in session regenerate
bug #12235 [Validator] Fixed Regex::getHtmlPattern() to work with complex and negated patterns (webmozart)

This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Fixed Regex::getHtmlPattern() to work with complex and negated patterns

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

According to my own testing, this should fix the generation of HTML patterns when `Regex::$match` is set to false. Additionally, patterns containing pipes (or statements) are fixed. See the test cases for examples.

Commits
-------

bf006f5 [Validator] Fixed Regex::getHtmlPattern() to work with complex and negated patterns
Indicate which file was being parsed if an exception is thrown while running translation:debug

When running the translation:debug command, if a template contains invalid twig markup,
an exception is thrown. This patch rethrows a new exception that includes the filename
being parsed in the message to aid debuging.
[TwigBundle] added a test
bug #12170 [Form] fix form handling with OPTIONS request method (Tobion)

This PR was merged into the 2.3 branch.

Discussion
----------

[Form] fix form handling with OPTIONS request method

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

The OPTIONS request is just handled as any other request method. And accoring to the spec, an options request can also contain a request body like a POST. This only applied when using the deprecated form processing with `$form->submit($request)`. The change also makes the handling consistent with the `handleRequest` behavior via https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php

Commits
-------

28eabd8 [Form] fix form handling with unconventional request methods like OPTIONS
minor #12377 Translation debug improve error reporting (mrthehud, fabpot)

This PR was merged into the 2.3 branch.

Discussion
----------

Translation debug improve error reporting

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

Indicate which file was being parsed if an exception is thrown while running translation:debug

When running the translation:debug command, if a template contains invalid twig markup,
an exception is thrown. This patch rethrows a new exception that includes the filename
being parsed in the message to aid debugging.

Commits
-------

97a8f7e [TwigBundle] added a test
b1bffc0 Indicate which file was being parsed if an exception is thrown while running translation:debug
bug #12370 [Yaml] improve error message for multiple documents (xabbuh)

This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] improve error message for multiple documents

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

The YAML parser doesn't support multiple documents. This pull requests
improves the error message when the parser detects multiple YAML
documents.

see also #11840

Commits
-------

c77fdcb improve error message for multiple documents
minor #12168 [HttpFoundation] CSRF warning docs on Request::enableHttpMethodParameterOverride() (Kristof Van Cauwenbergh)

This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] CSRF warning docs on Request::enableHttpMethodParameterOverride()

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

Since I wanted to understand this issue I did some research and altered the comment block. Is this a clear enough explanation or does it need more?

Commits
-------

deb70ab CSRF warning docs on Request::enableHttpMethodParameterOverride()
added missing files