From 7ef5cbfb96a27caa56015f05befe4ea109fb78bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rapha=C3=ABl=20Doursenaud?= Date: Sat, 29 Aug 2015 17:29:00 +0200 Subject: [PATCH] Updated raven-php to v0.12.1 --- composer.lock | 10 ++++----- htdocs/includes/bin/raven | 1 + htdocs/includes/composer/LICENSE | 21 +++++++++++++++++++ htdocs/includes/composer/installed.json | 12 +++++------ htdocs/includes/raven/raven/CHANGES | 6 ++++++ .../includes/raven/raven/lib/Raven/Client.php | 8 ++++++- .../raven/test/Raven/Tests/ClientTest.php | 11 ++++++++++ 7 files changed, 57 insertions(+), 12 deletions(-) create mode 120000 htdocs/includes/bin/raven create mode 100644 htdocs/includes/composer/LICENSE diff --git a/composer.lock b/composer.lock index 9e662436d4d..2856ef0b749 100644 --- a/composer.lock +++ b/composer.lock @@ -201,16 +201,16 @@ }, { "name": "raven/raven", - "version": "0.12.0", + "version": "0.12.1", "source": { "type": "git", "url": "https://github.com/getsentry/raven-php.git", - "reference": "bd247ca2a8fd9ccfb99b60285c9b31286384a92b" + "reference": "b325984c792ff89f985b73da9a3ad8ed8b520bca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/raven-php/zipball/bd247ca2a8fd9ccfb99b60285c9b31286384a92b", - "reference": "bd247ca2a8fd9ccfb99b60285c9b31286384a92b", + "url": "https://api.github.com/repos/getsentry/raven-php/zipball/b325984c792ff89f985b73da9a3ad8ed8b520bca", + "reference": "b325984c792ff89f985b73da9a3ad8ed8b520bca", "shasum": "" }, "require": { @@ -251,7 +251,7 @@ "log", "logging" ], - "time": "2015-05-19 20:20:08" + "time": "2015-08-25 22:38:46" }, { "name": "restler/framework", diff --git a/htdocs/includes/bin/raven b/htdocs/includes/bin/raven new file mode 120000 index 00000000000..9080498f871 --- /dev/null +++ b/htdocs/includes/bin/raven @@ -0,0 +1 @@ +../raven/raven/bin/raven \ No newline at end of file diff --git a/htdocs/includes/composer/LICENSE b/htdocs/includes/composer/LICENSE new file mode 100644 index 00000000000..c8d57af8b27 --- /dev/null +++ b/htdocs/includes/composer/LICENSE @@ -0,0 +1,21 @@ + +Copyright (c) 2015 Nils Adermann, Jordi Boggiano + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + diff --git a/htdocs/includes/composer/installed.json b/htdocs/includes/composer/installed.json index f2b965e2b6e..88bf8b37f43 100644 --- a/htdocs/includes/composer/installed.json +++ b/htdocs/includes/composer/installed.json @@ -343,17 +343,17 @@ }, { "name": "raven/raven", - "version": "0.12.0", - "version_normalized": "0.12.0.0", + "version": "0.12.1", + "version_normalized": "0.12.1.0", "source": { "type": "git", "url": "https://github.com/getsentry/raven-php.git", - "reference": "bd247ca2a8fd9ccfb99b60285c9b31286384a92b" + "reference": "b325984c792ff89f985b73da9a3ad8ed8b520bca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/getsentry/raven-php/zipball/bd247ca2a8fd9ccfb99b60285c9b31286384a92b", - "reference": "bd247ca2a8fd9ccfb99b60285c9b31286384a92b", + "url": "https://api.github.com/repos/getsentry/raven-php/zipball/b325984c792ff89f985b73da9a3ad8ed8b520bca", + "reference": "b325984c792ff89f985b73da9a3ad8ed8b520bca", "shasum": "" }, "require": { @@ -364,7 +364,7 @@ "fabpot/php-cs-fixer": "^1.8.0", "phpunit/phpunit": "^4.6.6" }, - "time": "2015-05-19 20:20:08", + "time": "2015-08-25 22:38:46", "bin": [ "bin/raven" ], diff --git a/htdocs/includes/raven/raven/CHANGES b/htdocs/includes/raven/raven/CHANGES index 6d52a4bfd49..9996ac8e196 100644 --- a/htdocs/includes/raven/raven/CHANGES +++ b/htdocs/includes/raven/raven/CHANGES @@ -1,3 +1,9 @@ +0.12.1 +------ + +- Dont send empty values for various context. + + 0.12.0 ------ diff --git a/htdocs/includes/raven/raven/lib/Raven/Client.php b/htdocs/includes/raven/raven/lib/Raven/Client.php index 94668883824..64e990eac8c 100644 --- a/htdocs/includes/raven/raven/lib/Raven/Client.php +++ b/htdocs/includes/raven/raven/lib/Raven/Client.php @@ -16,7 +16,7 @@ class Raven_Client { - const VERSION = '0.12.0'; + const VERSION = '0.12.1'; const PROTOCOL = '6'; const DEBUG = 'debug'; @@ -449,6 +449,12 @@ class Raven_Client $this->context->extra, $data['extra']); + // avoid empty arrays (which dont convert to dicts) + if (empty($data['extra'])) + unset($data['extra']); + if (empty($data['tags'])) + unset($data['tags']); + if ((!$stack && $this->auto_log_stacks) || $stack === true) { $stack = debug_backtrace(); diff --git a/htdocs/includes/raven/raven/test/Raven/Tests/ClientTest.php b/htdocs/includes/raven/raven/test/Raven/Tests/ClientTest.php index cdec2fd4756..702ec07f34e 100644 --- a/htdocs/includes/raven/raven/test/Raven/Tests/ClientTest.php +++ b/htdocs/includes/raven/raven/test/Raven/Tests/ClientTest.php @@ -209,6 +209,17 @@ class Raven_Tests_ClientTest extends PHPUnit_Framework_TestCase $this->assertEquals($event['extra']['foo'], 'bar'); } + public function testEmptyExtraData() + { + $client = new Dummy_Raven_Client(array('extra' => array())); + + $client->captureMessage('Test Message %s', array('foo')); + $events = $client->getSentEvents(); + $this->assertEquals(count($events), 1); + $event = array_pop($events); + $this->assertEquals(array_key_exists('extra', $event), false); + } + public function testCaptureMessageDoesHandleUninterpolatedMessage() { $client = new Dummy_Raven_Client();