[Filesystem] copy() is not working when open_basedir is set

More details: https://bugs.php.net/bug.php?id=64634
[BrowserKit] fixed BC break done recently
merged branch fabpot/cookies (PR #7879)

This PR was merged into the 2.1 branch.

Discussion
----------

[BrowserKit] fixed BC break done recently

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

This PR tries to avoid a BC break that was introduced recently in the management of cookies (see #7738).

see fabpot/Silex#684

Commits
-------

25b8b84 [BrowserKit] fixed BC break done recently
Fix getPort() returning 80 instead of 443 when X-FORWARDED-PROTO is set to https
merged branch pst/master (PR #7871)

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

Discussion
----------

Fix getPort() returning 80 instead of 443 when X-FORWARDED-PROTO is set to https

[HttpFoundation] fixed something

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

Ensure that the getPort() method returns port 443 as default when
X-FORWARDED-PROTO is set to https. Currently it would return port 80
if X-FORWARDED-PROTO was set to https and X-FORWARDED-PORT was not
set by the trusted proxy.

Commits
-------

8554af3 Fix getPort() returning 80 instead of 443 when X-FORWARDED-PROTO is set to https
merged branch stloyd/patch-3 (PR #7869)

This PR was merged into the 2.1 branch.

Discussion
----------

[Filesystem] copy() is not working when open_basedir is set

More details: https://bugs.php.net/bug.php?id=64634

Commits
-------

10dea94 [Filesystem] copy() is not working when open_basedir is set
use while loop for iterating

The other method limits the number of results without taking the
constraints into account.

Fixes GH-7883
merged branch henrikbjorn/filesystem-limit (PR #7886)

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

Discussion
----------

[HttpKernel][Profile] Fixes #7883

Commits
-------

0172fc1 [HttpKernel][Profile] use while loop for iterating
remove validation related headers when needed
merged branch bamarni/issue-6977 (PR #7857)

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

Discussion
----------

[HttpCache] remove validation related headers when needed

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

Fixes #6977 by removing validation related headers when there is at least one embedded response.

I've added an embedded response counter because the current check was wrong I think, it was checking count($this->ttls) which isn't updated for validateable responses.

And for the BC break, looking at the interface PHPDoc description, it supposes add() method should only be applied on esi responses and update() takes the master one at the end, what do you think?

Commits
-------

bb80139 [HttpCache] remove validation related headers when needed