Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Commit

Permalink
feat: add Silex runtime version reporting
Browse files Browse the repository at this point in the history
Uses new hook in Configuration to append the Symphony and Silex application versions to the device
data to make it reportable.
  • Loading branch information
tomlongridge committed Jun 3, 2019
1 parent 18c5156 commit 26254d7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

## TBD

* Add Symfony/Silex version string to report and session payloads (device.runtimeVersions)
[#27](https://github.com/bugsnag/bugsnag-silex/pull/27)

## 2.4.0 (2017-12-21)

### Enhancements
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"require": {
"php": ">=5.5",
"silex/silex": "^1.2|^2.0",
"bugsnag/bugsnag": "^3.10"
"bugsnag/bugsnag": "^3.17"
},
"require-dev": {
"graham-campbell/testbench-core": "^1.1",
Expand Down
4 changes: 4 additions & 0 deletions src/AbstractServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Bugsnag\Configuration;
use InvalidArgumentException;
use Silex\Application;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Security\Core\User\UserInterface;

abstract class AbstractServiceProvider
Expand Down Expand Up @@ -61,6 +62,9 @@ protected function makeClient(Application $app)
$client->setBatchSending(isset($config['batch_sending']) ? $config['batch_sending'] : true);
$client->setSendCode(isset($config['send_code']) ? $config['send_code'] : true);

$client->getConfig()->mergeDeviceData(['runtimeVersions' => ['symfony' => Kernel::VERSION,
'silex' => $app::VERSION]]);

$client->setNotifier([
'name' => 'Bugsnag Silex',
'version' => static::VERSION,
Expand Down

0 comments on commit 26254d7

Please sign in to comment.