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
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