updated-packages
This commit is contained in:
22
vendor/bugsnag/bugsnag/src/Bugsnag/Client.php
vendored
22
vendor/bugsnag/bugsnag/src/Bugsnag/Client.php
vendored
@@ -93,6 +93,28 @@ class Bugsnag_Client
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds new data fields to the device data collection.
|
||||
*
|
||||
* @param array $data an associative array containing the new data to be added
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function mergeDeviceData($data)
|
||||
{
|
||||
return $this->diagnostics->mergeDeviceData($data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the device data.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getDeviceData()
|
||||
{
|
||||
return $this->diagnostics->getDeviceData();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set which release stages should be allowed to notify Bugsnag.
|
||||
*
|
||||
|
||||
@@ -18,7 +18,7 @@ class Bugsnag_Configuration
|
||||
public $proxySettings = array();
|
||||
public $notifier = array(
|
||||
'name' => 'Bugsnag PHP (Official)',
|
||||
'version' => '2.9.2',
|
||||
'version' => '2.10.1',
|
||||
'url' => 'https://bugsnag.com',
|
||||
);
|
||||
public $sendEnvironment = false;
|
||||
|
||||
@@ -9,6 +9,13 @@ class Bugsnag_Diagnostics
|
||||
*/
|
||||
private $config;
|
||||
|
||||
/**
|
||||
* The device data.
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
private $deviceData = array();
|
||||
|
||||
/**
|
||||
* Create a new diagnostics instance.
|
||||
*
|
||||
@@ -19,6 +26,8 @@ class Bugsnag_Diagnostics
|
||||
public function __construct(Bugsnag_Configuration $config)
|
||||
{
|
||||
$this->config = $config;
|
||||
|
||||
$this->mergeDeviceData(array('runtimeVersions' => array('php' => phpversion())));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -45,6 +54,20 @@ class Bugsnag_Diagnostics
|
||||
return $appData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Merges new data fields to the device data collection.
|
||||
*
|
||||
* @param array $deviceData the data to add
|
||||
*
|
||||
* @return $this
|
||||
*/
|
||||
public function mergeDeviceData($deviceData)
|
||||
{
|
||||
$this->deviceData = array_merge_recursive($this->deviceData, $deviceData);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the device information.
|
||||
*
|
||||
@@ -52,8 +75,9 @@ class Bugsnag_Diagnostics
|
||||
*/
|
||||
public function getDeviceData()
|
||||
{
|
||||
return array(
|
||||
'hostname' => $this->config->get('hostname', php_uname('n')),
|
||||
return array_merge(
|
||||
array('hostname' => $this->config->get('hostname', php_uname('n'))),
|
||||
array_filter($this->deviceData)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -233,11 +233,7 @@ class Bugsnag_Notification
|
||||
curl_setopt($http, CURLOPT_CONNECTTIMEOUT, $this->config->timeout);
|
||||
curl_setopt($http, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($http, CURLOPT_VERBOSE, false);
|
||||
if (defined('HHVM_VERSION')) {
|
||||
curl_setopt($http, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
|
||||
} else {
|
||||
curl_setopt($http, CURL_IPRESOLVE_V4, true);
|
||||
}
|
||||
curl_setopt($http, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
|
||||
|
||||
if (!empty($this->config->curlOptions)) {
|
||||
foreach ($this->config->curlOptions as $option => $value) {
|
||||
|
||||
Reference in New Issue
Block a user