mirror of
https://github.com/doctrine/dbal.git
synced 2026-03-23 22:32:15 +01:00
Merge branch '4.0.x' into 4.1.x
* 4.0.x: Make AbstractSchemaManager covariant to its template argument
This commit is contained in:
@@ -23,7 +23,7 @@ use function strtolower;
|
||||
* Base class for schema managers. Schema managers are used to inspect and/or
|
||||
* modify the database schema/structure.
|
||||
*
|
||||
* @template T of AbstractPlatform
|
||||
* @template-covariant T of AbstractPlatform
|
||||
*/
|
||||
abstract class AbstractSchemaManager
|
||||
{
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Doctrine\StaticAnalysis\DBAL;
|
||||
|
||||
use Doctrine\DBAL\Connection;
|
||||
use Doctrine\DBAL\Driver\PDO\PgSQL\Driver;
|
||||
use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory;
|
||||
use Doctrine\DBAL\Schema\PostgreSQLSchemaManager;
|
||||
use Exception;
|
||||
|
||||
$smf = new DefaultSchemaManagerFactory();
|
||||
$schemaManager = $smf->createSchemaManager(new Connection([], new Driver()));
|
||||
|
||||
if (!$schemaManager instanceof PostgreSQLSchemaManager) {
|
||||
throw new Exception('should not happen');
|
||||
}
|
||||
Reference in New Issue
Block a user