Skip to content

Commit 7ce2d23

Browse files
committed
Doctrine3: Adjust interfaces and autoloading to match implementation
1 parent ac937c8 commit 7ce2d23

File tree

4 files changed

+27
-4
lines changed

4 files changed

+27
-4
lines changed

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@
3030
},
3131
"autoload-dev": {
3232
"psr-0": {
33-
"Crate\\Test": "test",
34-
"Doctrine\\Tests": "vendor/doctrine/dbal/tests"
33+
"Crate\\Test": "test"
34+
},
35+
"psr-4": {
36+
"Doctrine\\DBAL\\Tests\\": "vendor/doctrine/dbal/tests"
3537
}
3638
},
3739
"config": {

src/Crate/DBAL/Driver/PDOCrate/Driver.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
use Crate\DBAL\Platforms\CratePlatform4;
2727
use Crate\DBAL\Schema\CrateSchemaManager;
2828
use Doctrine\DBAL\Connection;
29+
use Doctrine\DBAL\Driver\API\ExceptionConverter;
30+
use Doctrine\DBAL\Platforms\AbstractPlatform;
2931
use Doctrine\DBAL\VersionAwarePlatformDriver;
3032

3133
class Driver implements \Doctrine\DBAL\Driver, VersionAwarePlatformDriver
@@ -74,8 +76,9 @@ public function getDatabasePlatform()
7476
/**
7577
* {@inheritDoc}
7678
*/
77-
public function getSchemaManager(Connection $conn)
79+
public function getSchemaManager(Connection $conn, AbstractPlatform $platform)
7880
{
81+
// TODO: `$platform` added when upgrading to Doctrine3 - what to do with it?
7982
return new CrateSchemaManager($conn);
8083
}
8184

@@ -108,4 +111,13 @@ public function createDatabasePlatformForVersion($version)
108111
return new CratePlatform4();
109112
}
110113
}
114+
115+
/**
116+
* {@inheritDoc}
117+
*/
118+
public function getExceptionConverter(): ExceptionConverter
119+
{
120+
// TODO: Implement getExceptionConverter() method.
121+
// Added when upgrading to Doctrine3.
122+
}
111123
}

src/Crate/DBAL/Platforms/CratePlatform.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,4 +858,13 @@ public function getTableOptionsSQL(string $table) : string
858858
"FROM information_schema.tables c " .
859859
"WHERE " . $this->getTableWhereClause($table);
860860
}
861+
862+
/**
863+
* {@inheritDoc}
864+
*/
865+
public function getCurrentDatabaseExpression(): string
866+
{
867+
// TODO: Implement getCurrentDatabaseExpression() method.
868+
// Added when upgrading to Doctrine3.
869+
}
861870
}

test/Crate/Test/DBAL/Platforms/CratePlatformTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
use Doctrine\DBAL\Schema\Table;
3636
use Doctrine\DBAL\Schema\TableDiff;
3737
use Doctrine\DBAL\Types\Type;
38-
use Doctrine\Tests\DBAL\Platforms\AbstractPlatformTestCase;
38+
use Doctrine\DBAL\Tests\Platforms\AbstractPlatformTestCase;
3939

4040
class CratePlatformTest extends AbstractPlatformTestCase {
4141

0 commit comments

Comments
 (0)