Skip to content

Commit 12d0f96

Browse files
authored
Prepare release 4.3.0
2 parents 4174898 + f2290df commit 12d0f96

20 files changed

+144
-6
lines changed

.github/workflows/tests.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,16 +92,20 @@ jobs:
9292
missing-optional-packages-tests:
9393
name: Tests without optional packages
9494
runs-on: ubuntu-latest
95+
env:
96+
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
9597
strategy:
9698
fail-fast: false
9799
matrix:
98100
include:
99101
- php: '7.2'
100102
dependencies: lowest
103+
symfony-version: 3.4.*
101104
- php: '7.4'
102105
dependencies: highest
103106
- php: '8.0'
104107
dependencies: lowest
108+
symfony-version: 4.4.*
105109
- php: '8.1'
106110
dependencies: highest
107111

@@ -113,7 +117,8 @@ jobs:
113117
uses: shivammathur/setup-php@v2
114118
with:
115119
php-version: ${{ matrix.php }}
116-
coverage: xdebug
120+
coverage: pcov
121+
tools: flex
117122

118123
- name: Setup Problem Matchers for PHPUnit
119124
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
## Unreleased
44

5+
## 4.3.0 (2022-05-30)
56
- Fix compatibility issue with Symfony >= 6.1.0 (#635)
7+
- Add `TracingDriverConnectionInterface::getNativeConnection()` method to get the original driver connection (#597)
8+
- Add `options.http_timeout` and `options.http_connect_timeout` configuration options (#593)
69

710
## 4.2.10 (2022-05-17)
811

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"php": "^7.2||^8.0",
2727
"jean85/pretty-package-versions": "^1.5 || ^2.0",
2828
"php-http/discovery": "^1.11",
29-
"sentry/sdk": "^3.1",
29+
"sentry/sdk": "^3.2",
3030
"symfony/cache-contracts": "^1.1||^2.4||^3.0",
3131
"symfony/config": "^3.4.44||^4.4.20||^5.0.11||^6.0",
3232
"symfony/console": "^3.4.44||^4.4.20||^5.0.11||^6.0",
@@ -97,7 +97,7 @@
9797
},
9898
"extra": {
9999
"branch-alias": {
100-
"dev-master": "4.2.x-dev",
100+
"dev-master": "4.3.x-dev",
101101
"releases/3.2.x": "3.2.x-dev",
102102
"releases/2.x": "2.x-dev",
103103
"releases/1.x": "1.x-dev"

phpstan-baseline.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ parameters:
436436
path: tests/Tracing/Doctrine/DBAL/TracingServerInfoAwareDriverConnectionTest.php
437437

438438
-
439-
message: "#^Trying to mock an undefined method requiresQueryForServerVersion\\(\\) on class Sentry\\\\SentryBundle\\\\Tests\\\\Tracing\\\\Doctrine\\\\DBAL\\\\ServerInfoAwareConnectionStub\\.$#"
439+
message: "#^Trying to mock an undefined method requiresQueryForServerVersion\\(\\) on class Sentry\\\\SentryBundle\\\\Tests\\\\Tracing\\\\Doctrine\\\\DBAL\\\\Fixture\\\\ServerInfoAwareConnectionStub\\.$#"
440440
count: 1
441441
path: tests/Tracing/Doctrine/DBAL/TracingServerInfoAwareDriverConnectionTest.php
442442

src/DependencyInjection/Configuration.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@ public function getConfigTreeBuilder(): TreeBuilder
116116
->booleanNode('send_default_pii')->end()
117117
->integerNode('max_value_length')->min(0)->end()
118118
->scalarNode('http_proxy')->end()
119+
->integerNode('http_connect_timeout')
120+
->min(0)
121+
->info('The maximum number of seconds to wait while trying to connect to a server. It works only when using the default transport.')
122+
->end()
123+
->integerNode('http_timeout')
124+
->min(0)
125+
->info('The maximum execution time for the request+response as a whole. It works only when using the default transport.')
126+
->end()
119127
->booleanNode('capture_silenced_errors')->end()
120128
->enumNode('max_request_body_size')
121129
->values([

src/Resources/config/schema/sentry-1.0.xsd

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
<xsd:attribute name="send-default-pii" type="xsd:boolean" />
5050
<xsd:attribute name="max-value-length" type="xsd:integer" />
5151
<xsd:attribute name="http-proxy" type="xsd:string" />
52+
<xsd:attribute name="http-timeout" type="xsd:integer" />
53+
<xsd:attribute name="http-connect-timeout" type="xsd:integer" />
5254
<xsd:attribute name="capture-silenced-errors" type="xsd:boolean" />
5355
<xsd:attribute name="max-request-body-size" type="max-request-body-size" />
5456
</xsd:complexType>

src/Tracing/Doctrine/DBAL/TracingDriverConnection.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,20 @@ public function rollBack(): bool
168168
});
169169
}
170170

171+
/**
172+
* {@inheritdoc}
173+
*
174+
* @return resource|object
175+
*/
176+
public function getNativeConnection()
177+
{
178+
if (!method_exists($this->decoratedConnection, 'getNativeConnection')) {
179+
throw new \BadMethodCallException(sprintf('The connection "%s" does not support accessing the native connection.', \get_class($this->decoratedConnection)));
180+
}
181+
182+
return $this->decoratedConnection->getNativeConnection();
183+
}
184+
171185
/**
172186
* {@inheritdoc}
173187
*/

src/Tracing/Doctrine/DBAL/TracingDriverConnectionInterface.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
use Doctrine\DBAL\Driver\Connection;
88

9+
/**
10+
* @method resource|object getNativeConnection()
11+
*/
912
interface TracingDriverConnectionInterface extends Connection
1013
{
1114
public function getWrappedConnection(): Connection;

src/Tracing/Doctrine/DBAL/TracingServerInfoAwareDriverConnection.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,20 @@ public function getServerVersion(): string
115115
return $wrappedConnection->getServerVersion();
116116
}
117117

118+
/**
119+
* {@inheritdoc}
120+
*
121+
* @return resource|object
122+
*/
123+
public function getNativeConnection()
124+
{
125+
if (!method_exists($this->decoratedConnection, 'getNativeConnection')) {
126+
throw new \BadMethodCallException(sprintf('The connection "%s" does not support accessing the native connection.', \get_class($this->decoratedConnection)));
127+
}
128+
129+
return $this->decoratedConnection->getNativeConnection();
130+
}
131+
118132
/**
119133
* {@inheritdoc}
120134
*/

tests/DependencyInjection/Fixtures/php/full.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
'send_default_pii' => true,
3737
'max_value_length' => 255,
3838
'http_proxy' => 'proxy.example.com:8080',
39+
'http_timeout' => 10,
40+
'http_connect_timeout' => 15,
3941
'capture_silenced_errors' => true,
4042
'max_request_body_size' => 'none',
4143
'class_serializers' => ['App\\FooClass' => 'App\\Sentry\\Serializer\\FooClassSerializer'],

0 commit comments

Comments
 (0)