Use setTimeZone if this method exists.

The php version is not a critical factor to choose the method, but we have to use setTimeZone, if it exists.
merged branch dropfen/master (PR #9015)

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

Discussion
----------

Fix #6029 : Use setTimeZone if this method exists.

The php version is not a critical factor to choose the method, but we have to use setTimeZone, if it exists.

Commits
-------

7d84cd7 Use setTimeZone if this method exists.
removed unneeded comment
NativeSessionStorage regenerate
merged branch lancergr/ticket_8460 (PR #8969)

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

Discussion
----------

[HttpFoundation] NativeSessionStorage regenerate

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

Since session_start is called by the regenerate function, then the 'started' flag of NativeSessionStorage have to be set to true. Otherwise, the variable $_SESSION is initiated and the exception "Failed to start the session: already started by PHP ($_SESSION is set)." is thrown.

This can be reproduced by clearing the session data (cookies) before authenticating with a method that does not require csrf (eg. using the confirmation link of FOSUserBundle).

Commits
-------

7a0eeb3 [HttpFoundation] NativeSessionStorage regenerate
fixed CS
[FrameworkBundle][Security] Replaced void return type with null for consistency
merged branch jakzal/dockblock-void-null-fix (PR #9026)

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

Discussion
----------

[FrameworkBundle][Security] Replaced void return type with null for consistency

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

We're using `null` everywhere else.

Commits
-------

e4100ac [FrameworkBundle][Security] Replaced void return type with null for consistency