Skip to content

Commit d68d99e

Browse files
hjanuschkaJean85
authored andcommitted
symfony version in 1.x (#117, backport of #116)
* backport #116 to 1.x * cs fix
1 parent 76bc046 commit d68d99e

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/SentrySymfonyClient.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public function __construct($dsn = null, $options = [])
1515
'name' => 'sentry-symfony',
1616
'version' => SentryBundle::VERSION,
1717
];
18+
$options['tags']['symfony_version'] = \Symfony\Component\HttpKernel\Kernel::VERSION;
1819

1920
parent::__construct($dsn, $options);
2021
}

test/SentrySymfonyClientTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,16 @@ public function test_that_it_forwards_options()
2222
{
2323
$client = new SentrySymfonyClient('https://a:[email protected]/project', [
2424
'name' => 'test',
25+
'tags' => ['some_custom' => 'test'],
2526
]);
2627

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

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

0 commit comments

Comments
 (0)