Skip to content

Commit 8dc0200

Browse files
hjanuschkaJean85
authored andcommitted
symfony version in 0.8.x (backport of #116)
(cherry picked from commit d68d99e)
1 parent 65bbda9 commit 8dc0200

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/Sentry/SentryBundle/SentrySymfonyClient.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ public function __construct($dsn=null, $options=array(), $error_types='')
1515
'name' => 'sentry-symfony',
1616
'version' => SentryBundle::VERSION,
1717
);
18+
$options['tags']['symfony_version'] = \Symfony\Component\HttpKernel\Kernel::VERSION;
19+
1820
parent::__construct($dsn, $options);
1921
}
2022
}

test/SentrySymfonyClientTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,17 @@ public function test_that_it_sets_sdk_name_and_version()
2020
public function test_that_it_forwards_options()
2121
{
2222
$client = new SentrySymfonyClient('https://a:[email protected]/project', array(
23-
'name' => 'test'
23+
'name' => 'test',
24+
'tags' => array('some_custom' => 'test'),
2425
));
2526

2627
$data = $client->get_default_data();
2728

2829
// Not a big fan of doing this kind of assertions, couples tests to external API...
2930
// Perhaps, refactor is needed for this class?
3031
$this->assertEquals('test', $data['server_name']);
32+
$this->assertEquals(\Symfony\Component\HttpKernel\Kernel::VERSION, $data['tags']['symfony_version']);
33+
$this->assertEquals('test', $data['tags']['some_custom']);
3134
$this->assertEquals('https://app.getsentry.com/api/project/store/', $client->getServerEndpoint(null));
3235
$this->assertEquals('a', $client->public_key);
3336
$this->assertEquals('b', $client->secret_key);

0 commit comments

Comments
 (0)