[MediaWiki-commits] [Gerrit] mediawiki...Sentry[master]: Be compatible with PHP 7's Throwable interface

2018-01-06 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/402623 )

Change subject: Be compatible with PHP 7's Throwable interface
..


Be compatible with PHP 7's Throwable interface

Instead of just Exceptions, in PHP 7 we can now get Throwables too, but we
can't type hint against them to stay compatible with PHP 5 still.

Bug: T184359
Change-Id: I7f2d9d7e4cea7bb99c28d60dcba01990a35c5b5d
---
M SentryHooks.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/SentryHooks.php b/SentryHooks.php
index 4dfc95d..9daa500 100644
--- a/SentryHooks.php
+++ b/SentryHooks.php
@@ -62,11 +62,11 @@
}
 
/**
-* @param Exception $e
+* @param Exception|Throwable $e
 * @param bool $suppressed True if the error is below the level set in 
error_reporting().
 * @return bool
 */
-   public static function onLogException( Exception $e, $suppressed ) {
+   public static function onLogException( $e, $suppressed ) {
global $wgSentryDsn, $wgSentryLogPhpErrors, $wgVersion;
 
if ( !$wgSentryLogPhpErrors || $suppressed ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/402623
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I7f2d9d7e4cea7bb99c28d60dcba01990a35c5b5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Sentry
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] mediawiki...Sentry[master]: Be compatible with PHP 7's Throwable interface

2018-01-06 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/402623 )

Change subject: Be compatible with PHP 7's Throwable interface
..

Be compatible with PHP 7's Throwable interface

Instead of just Exceptions, in PHP 7 we can now get Throwables too, but we
can't type hint against them to stay compatible with PHP 5 still.

Bug: T184359
Change-Id: I7f2d9d7e4cea7bb99c28d60dcba01990a35c5b5d
---
M SentryHooks.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Sentry 
refs/changes/23/402623/1

diff --git a/SentryHooks.php b/SentryHooks.php
index 4dfc95d..9daa500 100644
--- a/SentryHooks.php
+++ b/SentryHooks.php
@@ -62,11 +62,11 @@
}
 
/**
-* @param Exception $e
+* @param Exception|Throwable $e
 * @param bool $suppressed True if the error is below the level set in 
error_reporting().
 * @return bool
 */
-   public static function onLogException( Exception $e, $suppressed ) {
+   public static function onLogException( $e, $suppressed ) {
global $wgSentryDsn, $wgSentryLogPhpErrors, $wgVersion;
 
if ( !$wgSentryLogPhpErrors || $suppressed ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/402623
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7f2d9d7e4cea7bb99c28d60dcba01990a35c5b5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Sentry
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits