Skip to content

Commit

Permalink
Revert dbal changes (#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
cleptric committed Jun 19, 2023
1 parent 315147a commit 7ba0a93
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 296 deletions.
12 changes: 0 additions & 12 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ jobs:
- 6.*
dependencies:
- highest
doctrine-dbal:
- highest
exclude:
- php: '7.2'
symfony-version: 6.*
Expand All @@ -43,18 +41,12 @@ jobs:
- php: '7.2'
symfony-version: 4.4.*
dependencies: lowest
doctrine-dbal: '^2.13'
- php: '7.2'
symfony-version: 5.*
dependencies: lowest
doctrine-dbal: '^2.13'
- php: '8.0'
symfony-version: 6.*
dependencies: lowest
doctrine-dbal: '^2.13'
- php: '8.0'
symfony-version: 6.*
doctrine-dbal: '<3.2'

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

- name: Update Doctrine DBAL
run: composer require --dev doctrine/dbal "${{ matrix.doctrine-dbal }}" --no-update
if: matrix.doctrine-dbal != 'highest'

- name: Install dependencies
uses: ramsey/composer-install@v1
with:
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 4.9.2

The Sentry SDK team is happy to announce the immediate availability of Sentry Symfony SDK v4.9.2.

### Bug Fixes

- We decided to revert two previous PRs that aimed to remove deprecation warnings during test runs [(#736)](https://github.com/getsentry/sentry-symfony/pull/736)

- Revert: Add a new Doctrine DBAL tracing driver that does not implement the deprecated `VersionAwarePlatformDriver` [(#723)](https://github.com/getsentry/sentry-symfony/pull/723)
- Revert: Fix a regression in `TracingDriverForV32` by adding `VersionAwarePlatformDriver::createDatabasePlatformForVersion` [(#731)](https://github.com/getsentry/sentry-symfony/pull/731)

We are sorry for the inconvenience caused by these changes.

## 4.9.1

The Sentry SDK team is happy to announce the immediate availability of Sentry Symfony SDK v4.9.1.
Expand Down
11 changes: 0 additions & 11 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,6 @@
<code>$params</code>
</MoreSpecificImplementedParamType>
</file>
<file src="src/Tracing/Doctrine/DBAL/TracingDriverForV32.php">
<InvalidReturnStatement occurrences="1">
<code>$this-&gt;decoratedDriver-&gt;getSchemaManager($conn, $platform)</code>
</InvalidReturnStatement>
<InvalidReturnType occurrences="1">
<code>AbstractSchemaManager&lt;T&gt;</code>
</InvalidReturnType>
<MoreSpecificImplementedParamType occurrences="1">
<code>$params</code>
</MoreSpecificImplementedParamType>
</file>
<file src="src/Tracing/HttpClient/TraceableResponseForV5.php">
<UndefinedInterfaceMethod occurrences="1">
<code>toStream</code>
Expand Down
105 changes: 0 additions & 105 deletions src/Tracing/Doctrine/DBAL/TracingDriverForV32.php

This file was deleted.

9 changes: 1 addition & 8 deletions src/aliases.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Sentry\SentryBundle;

use Doctrine\DBAL\Exception\SchemaDoesNotExist;
use Doctrine\DBAL\Result;
use Sentry\SentryBundle\Tracing\Cache\TraceableCacheAdapter;
use Sentry\SentryBundle\Tracing\Cache\TraceableCacheAdapterForV2;
Expand All @@ -15,7 +14,6 @@
use Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriver;
use Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriverForV2;
use Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriverForV3;
use Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingDriverForV32;
use Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingStatement;
use Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingStatementForV2;
use Sentry\SentryBundle\Tracing\Doctrine\DBAL\TracingStatementForV3;
Expand Down Expand Up @@ -55,12 +53,7 @@ class_alias(TraceableTagAwareCacheAdapterForV2::class, TraceableTagAwareCacheAda
if (!class_exists(TracingStatement::class)) {
if (class_exists(Result::class)) {
class_alias(TracingStatementForV3::class, TracingStatement::class);

if (class_exists(SchemaDoesNotExist::class)) {
class_alias(TracingDriverForV32::class, TracingDriver::class);
} else {
class_alias(TracingDriverForV3::class, TracingDriver::class);
}
class_alias(TracingDriverForV3::class, TracingDriver::class);
} elseif (interface_exists(Result::class)) {
class_alias(TracingStatementForV2::class, TracingStatement::class);
class_alias(TracingDriverForV2::class, TracingDriver::class);
Expand Down
7 changes: 0 additions & 7 deletions tests/DoctrineTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Doctrine\Bundle\DoctrineBundle\DoctrineBundle;
use Doctrine\DBAL\Driver;
use Doctrine\DBAL\Driver\ResultStatement;
use Doctrine\DBAL\Exception\SchemaDoesNotExist;
use PHPUnit\Framework\TestCase;

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

protected static function isDoctrineDBALVersion32Installed(): bool
{
return self::isDoctrineDBALInstalled()
&& class_exists(SchemaDoesNotExist::class);
}

protected static function isDoctrineBundlePackageInstalled(): bool
{
return class_exists(DoctrineBundle::class);
Expand Down
148 changes: 0 additions & 148 deletions tests/Tracing/Doctrine/DBAL/TracingDriverForV32Test.php

This file was deleted.

4 changes: 2 additions & 2 deletions tests/Tracing/Doctrine/DBAL/TracingDriverForV3Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ final class TracingDriverForV3Test extends DoctrineTestCase

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

Expand Down

0 comments on commit 7ba0a93

Please sign in to comment.