force the Content-Type to html in the web profiler controllers
Fixed exit code for exceptions with error code 0
merged branch Stelian/2.2 (PR #8183)

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

Discussion
----------

Fixed exit code for exceptions with error code 0

Covers https://github.com/symfony/symfony/issues/8180

Commits
-------

48e77f8 Fixed exit code for exceptions with error code 0
[Console] fix status code when Exception::getCode returns something like 0.1
[Console] ensure exit code between 0-254

255 is reserved by PHP and should not be used

also put this code inside the codeCoverageIgnore block because it cannot be tested with phpunit
[Finder] Fix SplFileInfo::getContents isn't working with ssh2 protocol
merged branch Tobion/console-status-code (PR #8202)

This PR was merged into the 2.1 branch.

Discussion
----------

[Console] fix status and exit code

Fix https://github.com/symfony/symfony/pull/8183#discussion_r4525267
and
http://www.php.net/manual/en/function.exit.php
> Exit statuses should be in the range 0 to 254, the exit status 255 is reserved by PHP and shall not be used. The status 0 is used to terminate the program successfully.

Commits
-------

6b9180a [Console] ensure exit code between 0-254
445b2e3 [Console] fix status code when Exception::getCode returns something like 0.1
Revert "[Console] ensure exit code between 0-254"

This reverts commit 6b9180a23ded06648ea8c79251e96ce87dd5c94f.
Merge branch '2.1' into 2.2

* 2.1:
  Revert "[Console] ensure exit code between 0-254"
  [Console] ensure exit code between 0-254
  [Console] fix status code when Exception::getCode returns something like 0.1
  Fixed exit code for exceptions with error code 0
[Form] corrected interface bind() method defined against in deprecation notice
merged branch shieldo/correct_bind_interface (PR #8248)

This PR was merged into the 2.2 branch.

Discussion
----------

[Form] corrected interface bind() method defined against in deprecation ...

...notice

The 'bind' method is defined against `FormInterface` not `FormConfigInterface`. This corrects the deprecation notice in the `Form` implementation.

Commits
-------

de289d2 [Form] corrected interface bind() method defined against in deprecation notice
merged branch alquerci/ticket_8219 (PR #8243)

This PR was merged into the 2.2 branch.

Discussion
----------

[Finder] Fix SplFileInfo::getContents isn't working with ssh2 protocol

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

Commits
-------

849f3ed [Finder] Fix SplFileInfo::getContents isn't working with ssh2 protocol
[DomCrawler] Fix handling file:// without a host
merged branch lazyhammer/fix-crawler-file-scheme (PR #8264)

This PR was merged into the 2.2 branch.

Discussion
----------

[DomCrawler] Fix handling file:// without a host

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

Commits
-------

4139936 [DomCrawler] Fix handling file:// without a host
fix issue where $_ENV contains array vals

There are cases where $env or $_ENV can contain a value that is an array
This will cause Process to throw an Array to String conversion exception
Initially I submitted a patch of Process.php, however Fabien indicated
that it shouldn't be fixed there (see below pull request).

Before recently, a simple work around would be in php.ini to set:

  register_argc_argv = On

However with recent changes, this seems to no longer work.

Original pull request: https://github.com/symfony/symfony/pull/7354

See ticket https://github.com/symfony/symfony/issues/7196
merged branch oodle/ticket_7196 (PR #8227)

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

Discussion
----------

[Process] fix issue where $_ENV contains array vals

There are cases where $env or $_ENV can contain a value that is an array
This will cause Process to throw an Array to String conversion exception
Initially I submitted a patch of Process.php, however Fabien indicated
that it shouldn't be fixed there (see below pull request).

Before recently, a simple work around would be in php.ini to set:

  register_argc_argv = On

However with recent changes, this seems to no longer work.

Original pull request: https://github.com/symfony/symfony/pull/7354

See ticket https://github.com/symfony/symfony/issues/7196

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

Commits
-------

2c6af95 [Process] fix issue where $_ENV contains array vals
[Process] moved env check to the Process class (refs #8227)
do not re-register commands each time a Console\Application is run
merged branch tomglue/console_reregister_commands_fix (PR #8242)

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

Discussion
----------

[FrameworkBundle] do not re-register commands each time a Console\Application is run

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

I have been experimenting with using the Symfony console application inside of a React event loop which works quite well.

In this scenario, I re-use an instances of a Console\Application to run multiple tasks. This works well apart from unnecessarily reloading the command classes from all included bundles each time doRun() is called (https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/Console/Application.php#L68). This can also lead to running out of file descriptors under heavy load as bootstrap.php.cache uses a RecursiveDirectoryIterator to load the command.

Commits
-------

1983fc3 [FrameworkBundle] do not re-register commands each time a Console\Application is run
[FrameworkBundle] tweaked previous merge (refs #8242)