Skip to content

Commit 1ceb919

Browse files
committed
Revert "fix: Implement createDatabasePlatformForVersion() method in TracingDriverForV32 class (#731)"
This reverts commit 58ec963.
1 parent 315147a commit 1ceb919

File tree

2 files changed

+0
-52
lines changed

2 files changed

+0
-52
lines changed

src/Tracing/Doctrine/DBAL/TracingDriverForV32.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -86,20 +86,4 @@ public function getExceptionConverter(): ExceptionConverter
8686
{
8787
return $this->decoratedDriver->getExceptionConverter();
8888
}
89-
90-
/**
91-
* {@inheritdoc}
92-
*
93-
* @phpstan-param string $version
94-
*
95-
* @phpstan-return AbstractPlatform
96-
*/
97-
public function createDatabasePlatformForVersion($version): AbstractPlatform
98-
{
99-
if (method_exists($this->decoratedDriver, 'createDatabasePlatformForVersion')) {
100-
return $this->decoratedDriver->createDatabasePlatformForVersion($version);
101-
}
102-
103-
return $this->getDatabasePlatform();
104-
}
10589
}

tests/Tracing/Doctrine/DBAL/TracingDriverForV32Test.php

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -109,40 +109,4 @@ public function testGetExceptionConverter(): void
109109

110110
$this->assertSame($exceptionConverter, $driver->getExceptionConverter());
111111
}
112-
113-
public function testCreateDatabasePlatform(): void
114-
{
115-
$databasePlatform = $this->createMock(AbstractPlatform::class);
116-
117-
$decoratedDriver = $this->createMock(DriverInterface::class);
118-
$decoratedDriver->expects($this->once())
119-
->method('getDatabasePlatform')
120-
->willReturn($databasePlatform);
121-
122-
$driver = new TracingDriverForV32($this->connectionFactory, $decoratedDriver);
123-
124-
$this->assertSame($databasePlatform, $driver->createDatabasePlatformForVersion('5.7'));
125-
}
126-
127-
public function testCreateDatabasePlatformForVersionWhenDriverDefinedCreateDatabasePlatformForVersion(): void
128-
{
129-
$databasePlatform = $this->createMock(AbstractPlatform::class);
130-
131-
$decoratedDriver = $this->createMock(StubCreateDatabasePlatformForVersionDriver::class);
132-
$decoratedDriver->expects($this->once())
133-
->method('createDatabasePlatformForVersion')
134-
->with('5.7')
135-
->willReturn($databasePlatform);
136-
137-
$driver = new TracingDriverForV32($this->connectionFactory, $decoratedDriver);
138-
139-
$this->assertSame($databasePlatform, $driver->createDatabasePlatformForVersion('5.7'));
140-
}
141-
}
142-
143-
if (interface_exists(DriverInterface::class)) {
144-
interface StubCreateDatabasePlatformForVersionDriver extends DriverInterface
145-
{
146-
public function createDatabasePlatformForVersion(string $version): AbstractPlatform;
147-
}
148112
}

0 commit comments

Comments
 (0)