-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy pathAbstractSQLiteDriver.php
52 lines (44 loc) · 1.39 KB
/
AbstractSQLiteDriver.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
namespace Doctrine\DBAL\Driver;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Driver;
use Doctrine\DBAL\Driver\API\ExceptionConverter;
use Doctrine\DBAL\Driver\API\SQLite;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Schema\SqliteSchemaManager;
use Doctrine\Deprecations\Deprecation;
use function assert;
/**
* Abstract base implementation of the {@see Doctrine\DBAL\Driver} interface for SQLite based drivers.
*/
abstract class AbstractSQLiteDriver implements Driver
{
/**
* {@inheritdoc}
*/
public function getDatabasePlatform()
{
return new SqlitePlatform();
}
/**
* {@inheritdoc}
*
* @deprecated Use {@link SqlitePlatform::createSchemaManager()} instead.
*/
public function getSchemaManager(Connection $conn, AbstractPlatform $platform)
{
Deprecation::triggerIfCalledFromOutside(
'doctrine/dbal',
'https://github.com/doctrine/dbal/pull/5458',
'AbstractSQLiteDriver::getSchemaManager() is deprecated.'
. ' Use SqlitePlatform::createSchemaManager() instead.',
);
assert($platform instanceof SqlitePlatform);
return new SqliteSchemaManager($conn, $platform);
}
public function getExceptionConverter(): ExceptionConverter
{
return new SQLite\ExceptionConverter();
}
}