Skip to content

Commit f242340

Browse files
committed
Revert "Introduce TracingDriverForV32 for DBAL >= 3.2 (#723)"
This reverts commit 7d73be0.
1 parent 1ceb919 commit f242340

File tree

11 files changed

+6
-247
lines changed

11 files changed

+6
-247
lines changed

.github/workflows/tests.yaml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ jobs:
3030
- 6.*
3131
dependencies:
3232
- highest
33-
doctrine-dbal:
34-
- highest
3533
exclude:
3634
- php: '7.2'
3735
symfony-version: 6.*
@@ -43,18 +41,12 @@ jobs:
4341
- php: '7.2'
4442
symfony-version: 4.4.*
4543
dependencies: lowest
46-
doctrine-dbal: '^2.13'
4744
- php: '7.2'
4845
symfony-version: 5.*
4946
dependencies: lowest
50-
doctrine-dbal: '^2.13'
5147
- php: '8.0'
5248
symfony-version: 6.*
5349
dependencies: lowest
54-
doctrine-dbal: '^2.13'
55-
- php: '8.0'
56-
symfony-version: 6.*
57-
doctrine-dbal: '<3.2'
5850

5951
steps:
6052
- name: Checkout
@@ -76,10 +68,6 @@ jobs:
7668
run: composer require --dev phpunit/phpunit ^9.3.9 --no-update
7769
if: matrix.php == '8.0' && matrix.dependencies == 'lowest'
7870

79-
- name: Update Doctrine DBAL
80-
run: composer require --dev doctrine/dbal "${{ matrix.doctrine-dbal }}" --no-update
81-
if: matrix.doctrine-dbal != 'highest'
82-
8371
- name: Install dependencies
8472
uses: ramsey/composer-install@v1
8573
with:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
"require-dev": {
4343
"doctrine/dbal": "^2.13||^3.0",
4444
"doctrine/doctrine-bundle": "^1.12||^2.5",
45-
"friendsofphp/php-cs-fixer": "^2.19||<=3.16.0",
45+
"friendsofphp/php-cs-fixer": "^2.19||^3.6",
4646
"jangregor/phpstan-prophecy": "^1.0",
4747
"monolog/monolog": "^1.3||^2.0",
4848
"phpspec/prophecy": "!=1.11.0",

phpstan-baseline.neon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ parameters:
231231
path: src/Tracing/Doctrine/DBAL/TracingServerInfoAwareDriverConnection.php
232232

233233
-
234-
message: "#^Parameter \\#2 \\$callback of method Sentry\\\\SentryBundle\\\\Tracing\\\\Doctrine\\\\DBAL\\\\AbstractTracingStatement\\:\\:traceFunction\\(\\) expects callable\\(mixed \\.\\.\\.\\)\\: Doctrine\\\\DBAL\\\\Driver\\\\Result, array\\{Doctrine\\\\DBAL\\\\Driver\\\\Statement, 'execute'\\} given\\.$#"
234+
message: "#^Parameter \\#2 \\$callback of method Sentry\\\\SentryBundle\\\\Tracing\\\\Doctrine\\\\DBAL\\\\AbstractTracingStatement\\:\\:traceFunction\\(\\) expects callable\\(\\.\\.\\.mixed\\)\\: Doctrine\\\\DBAL\\\\Driver\\\\Result, array\\{Doctrine\\\\DBAL\\\\Driver\\\\Statement, 'execute'\\} given\\.$#"
235235
count: 1
236236
path: src/Tracing/Doctrine/DBAL/TracingStatementForV3.php
237237

psalm-baseline.xml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,6 @@
5050
<code>$params</code>
5151
</MoreSpecificImplementedParamType>
5252
</file>
53-
<file src="src/Tracing/Doctrine/DBAL/TracingDriverForV32.php">
54-
<InvalidReturnStatement occurrences="1">
55-
<code>$this-&gt;decoratedDriver-&gt;getSchemaManager($conn, $platform)</code>
56-
</InvalidReturnStatement>
57-
<InvalidReturnType occurrences="1">
58-
<code>AbstractSchemaManager&lt;T&gt;</code>
59-
</InvalidReturnType>
60-
<MoreSpecificImplementedParamType occurrences="1">
61-
<code>$params</code>
62-
</MoreSpecificImplementedParamType>
63-
</file>
6453
<file src="src/Tracing/HttpClient/TraceableResponseForV5.php">
6554
<UndefinedInterfaceMethod occurrences="1">
6655
<code>toStream</code>

src/Tracing/Doctrine/DBAL/TracingDriverForV32.php

Lines changed: 0 additions & 89 deletions
This file was deleted.

src/aliases.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace Sentry\SentryBundle;
66

7-
use Doctrine\DBAL\Exception\SchemaDoesNotExist;
87
use Doctrine\DBAL\Result;
98
use Sentry\SentryBundle\Tracing\Cache\TraceableCacheAdapter;
109
use Sentry\SentryBundle\Tracing\Cache\TraceableCacheAdapterForV2;
@@ -15,7 +14,6 @@
1514
use Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriver;
1615
use Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriverForV2;
1716
use Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriverForV3;
18-
use Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriverForV32;
1917
use Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingStatement;
2018
use Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingStatementForV2;
2119
use Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingStatementForV3;
@@ -55,12 +53,7 @@ class_alias(TraceableTagAwareCacheAdapterForV2::class, TraceableTagAwareCacheAda
5553
if (!class_exists(TracingStatement::class)) {
5654
if (class_exists(Result::class)) {
5755
class_alias(TracingStatementForV3::class, TracingStatement::class);
58-
59-
if (class_exists(SchemaDoesNotExist::class)) {
60-
class_alias(TracingDriverForV32::class, TracingDriver::class);
61-
} else {
62-
class_alias(TracingDriverForV3::class, TracingDriver::class);
63-
}
56+
class_alias(TracingDriverForV3::class, TracingDriver::class);
6457
} elseif (interface_exists(Result::class)) {
6558
class_alias(TracingStatementForV2::class, TracingStatement::class);
6659
class_alias(TracingDriverForV2::class, TracingDriver::class);

tests/DoctrineTestCase.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
88
use Doctrine\DBAL\Driver;
99
use Doctrine\DBAL\Driver\ResultStatement;
10-
use Doctrine\DBAL\Exception\SchemaDoesNotExist;
1110
use PHPUnit\Framework\TestCase;
1211

1312
abstract class DoctrineTestCase extends TestCase
@@ -29,12 +28,6 @@ protected static function isDoctrineDBALVersion3Installed(): bool
2928
&& !self::isDoctrineDBALVersion2Installed();
3029
}
3130

32-
protected static function isDoctrineDBALVersion32Installed(): bool
33-
{
34-
return self::isDoctrineDBALInstalled()
35-
&& class_exists(SchemaDoesNotExist::class);
36-
}
37-
3831
protected static function isDoctrineBundlePackageInstalled(): bool
3932
{
4033
return class_exists(DoctrineBundle::class);

tests/End2End/App/Command/MainCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class MainCommand extends Command
1313
{
14-
protected function configure(): void
14+
protected function configure()
1515
{
1616
$this
1717
->addOption('option1', null, InputOption::VALUE_NONE)

tests/Tracing/Doctrine/DBAL/TracingDriverForV32Test.php

Lines changed: 0 additions & 112 deletions
This file was deleted.

tests/Tracing/Doctrine/DBAL/TracingDriverForV3Test.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ final class TracingDriverForV3Test extends DoctrineTestCase
2626

2727
public static function setUpBeforeClass(): void
2828
{
29-
if (!self::isDoctrineDBALVersion3Installed() || self::isDoctrineDBALVersion32Installed()) {
30-
self::markTestSkipped('This test requires the version of the "doctrine/dbal" Composer package to be >= 3.0 <= 3.2.');
29+
if (!self::isDoctrineDBALVersion3Installed()) {
30+
self::markTestSkipped('This test requires the version of the "doctrine/dbal" Composer package to be >= 3.0.');
3131
}
3232
}
3333

tests/Tracing/Doctrine/DBAL/TracingStatementForV3Test.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,6 @@ public function testBindValue(): void
5555
$this->assertTrue($this->statement->bindValue('foo', 'bar', ParameterType::INTEGER));
5656
}
5757

58-
/**
59-
* @group legacy
60-
*/
6158
public function testBindParam(): void
6259
{
6360
$variable = 'bar';

0 commit comments

Comments
 (0)