feature#9119 [HttpFoundation] Add a way to avoid the session be written at each request (adrienbrault)

This PR was merged into the master branch.

Discussion
----------

[HttpFoundation] Add a way to avoid the session be written at each request

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no (maybe the DI config ?)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/3017

Commits
-------

38f02ea [HttpFoundation] Add a way to avoid the session be written at each request
pass command name automatically if required by the application
feature#8626 [Console] pass command name automatically if required by the application (xabbuh)

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

Discussion
----------

[Console] pass command name automatically if required by the application

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

Commits
-------

50c8050 [Console] pass command name automatically if required by the application
[Console] added some tests for previous merge (refs #8626)
[HttpFoundation] added a way to override the Request class
feature#8957 [HttpFoundation] added a way to override the Request class (fabpot)

This PR was merged into the master branch.

Discussion
----------

[HttpFoundation] added a way to override the Request class

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7461, #7453
| License       | MIT
| Doc PR        | symfony/symfony-docs#3021

This is an alternative implementation for #7461.

I've also reverted #7381 and #7390 as these changes are not needed anymore.

Todo:

 - [ ] add some tests

Commits
-------

464439d [HttpFoundation] added a way to override the Request class
[Security] Fixed test cases of the Csrf sub-component
bug#9183 [Security] Fixed test cases of the Csrf sub-component (bschussek)

This PR was merged into the master branch.

Discussion
----------

[Security] Fixed test cases of the Csrf sub-component

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

Commits
-------

7c7d86e [Security] Fixed test cases of the Csrf sub-component
[Form] Let null values to unset fields in PATCH requests
[DomCrawler] Allowed internal validation of ChoiceFormField to be disabled
feature#8637 [DomCrawler] Allowed internal validation of ChoiceFormField to be disabled (pylebecq)

This PR was squashed before being merged into the master branch (closes #8637).

Discussion
----------

[DomCrawler] Allowed internal validation of ChoiceFormField to be disabled

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

Hi,

Here is a quite basic attempt to be able to disable the internal validation of the ChoiceFormField. It's pretty basic.
Feel free to tell me what you think guys. Maybe I should check the `validationDisabled` property at the beginning of the `containsOption()` method ?
I'll make the documentation PR as soon as the implementation will be validated.

Regards.

Commits
-------

739bf71 [DomCrawler] Allowed internal validation of ChoiceFormField to be disabled
bug#9146 [RC][Form] Let null values clear fields in PATCH requests (alex88)

This PR was merged into the master branch.

Discussion
----------

[RC][Form] Let null values clear fields in PATCH requests

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes

I've changed the way form checks wherever or not to submit childs by checking submitted data with array_key_exists and not with just isset.

This way in PATCH requests values are not processed when they are not in array and not also when the value is null. Currently there is no way to null a value with a PATCH request, even passing it null.

This can lead to some BC breaks depending on how users used form in their code.

Commits
-------

f5812c5 [Form] Let null values to unset fields in PATCH requests
[FrameworkBundle] fixed path replacement on Windows

In the cache, blackslashes in paths can be both represented by a single
or a double backslash.
[Console] Throw an exception if the command does not contain aliases

It can only happend if the constructor has been overridden
feature #9186 [Console] Throw an exception if the command does not contain aliases (lyrixx)

This PR was merged into the master branch.

Discussion
----------

[Console] Throw an exception if the command does not contain aliases

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| license?      | MIT

It can only happend if the constructor has been overridden

Commits
-------

7e5c901 [Console] Throw an exception if the command does not contain aliases
[Form] add support for Length and Range constraint in order to replace MaxLength, MinLength, Max and Min constraints in next release (2.3)
[Templating] fix logic regarding template references and many phpdocs
minor #8927 [Templating] fix logic regarding template references and many phpdocs (Tobion)

This PR was squashed before being merged into the master branch (closes #8927).

Discussion
----------

[Templating] fix logic regarding template references and many phpdocs

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

this clarifies the expected types and exceptions by much. and it fixes some logic flaws.
- missing info/methods in interfaces
- respecting Twig_LoaderInterface only accepting strings, not objects

related to fabpot/Twig#1183 but does not depend on it

Commits
-------

f6c12bd [Templating] fix logic regarding template references and many phpdocs
bug #9188 [2.2][Form] add support for Length and Range constraint in ValidatorTypeGuesser (franek)

This PR was merged into the 2.2 branch.

Discussion
----------

[2.2][Form] add support for Length and Range constraint in ValidatorTypeGuesser

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

MaxLength, MinLength, Min and Max constraints are deprecated on 2.2. Will be removed in 2.3.

Add support for type guessing of Length and Range constraints.

fix #9132 on 2.2 branch

Commits
-------

89a0404 [Form] add support for Length and Range constraint in order to replace MaxLength, MinLength, Max and Min constraints in next release (2.3)
Merge branch '2.2' into 2.3

* 2.2:
  [Form] add support for Length and Range constraint in order to replace MaxLength, MinLength, Max and Min constraints in next release (2.3)
  [Form] check the required output timezone against the actual timezone of the input datetime object, rather than the expected timezone supplied