Skip to content

Conversation

@Starli0n
Copy link
Contributor

@Starli0n Starli0n commented Sep 7, 2016

Hi,

Could you please perform this pull request to fix the issue #1983.

Thanks

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 97.003% when pulling 20471ea on Starli0n:3.x into 1dedd25 on slimphp:3.x.

@dopesong
Copy link
Contributor

dopesong commented Sep 7, 2016

Coverage decreased (-0.2%) to 97.003% - you should provide tests for this :)

@Starli0n Starli0n force-pushed the 3.x branch 4 times, most recently from ca67edb to 6de5ae4 Compare September 9, 2016 12:28
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.2%) to 97.003% when pulling 6de5ae4 on Starli0n:3.x into 1dedd25 on slimphp:3.x.

@Starli0n
Copy link
Contributor Author

Starli0n commented Sep 9, 2016

@dopesong

I added a test coverage for PHP7 only.

I do not know how to do better as far as Throwable appeared in PHP7.

@dopesong
Copy link
Contributor

dopesong commented Sep 9, 2016

Check it here: https://github.com/slimphp/Slim/blob/3.x/tests/Handlers/PhpErrorTest.php#L88

@Starli0n Starli0n force-pushed the 3.x branch 2 times, most recently from 11bda7b to 3cfd832 Compare September 12, 2016 16:30
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 97.064% when pulling 3cfd832 on Starli0n:3.x into 1dedd25 on slimphp:3.x.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 97.181% when pulling 13b786f on Starli0n:3.x into 1dedd25 on slimphp:3.x.

@Starli0n
Copy link
Contributor Author

As far as the coverage is performed in PHP5 and following the documentation http://php.net/manual/en/language.errors.php7.php#119652, the catch (Throwable $t) code is never reached in PHP5

try
{
   // Code that may throw an Exception or Error.
}
catch (Throwable $t)
{
   // Executed only in PHP 7, will not match in PHP 5
}
catch (Exception $e)
{
   // Executed only in PHP 5, will not be reached in PHP 7
}

Therefore I added @codeCoverageIgnore statement

@akrabat akrabat added this to the 3.6.0 milestone Oct 11, 2016
@akrabat akrabat closed this in 4117c4b Oct 11, 2016
@akrabat
Copy link
Member

akrabat commented Oct 11, 2016

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants