diff --git a/src/Connectors/ConnectionFactory.php b/src/Connectors/ConnectionFactory.php index 99b9beb..7585b27 100644 --- a/src/Connectors/ConnectionFactory.php +++ b/src/Connectors/ConnectionFactory.php @@ -1,5 +1,6 @@ container->bound($key = "db.connection.{$driver}")) { - return $this->container->make($key, [$connection, $database, $prefix, $config]); + if ($resolver = Connection::getResolver($driver)) { + return $resolver($connection, $database, $prefix, $config); } if ($driver === 'pgsql') { diff --git a/src/PostgisConnection.php b/src/PostgisConnection.php index 746feb0..6696bb1 100644 --- a/src/PostgisConnection.php +++ b/src/PostgisConnection.php @@ -7,15 +7,6 @@ class PostgisConnection extends PostgresConnection { - public function __construct($pdo, $database = '', $tablePrefix = '', array $config = []) - { - parent::__construct($pdo, $database, $tablePrefix, $config); - - // Prevent geography type fields from throwing a 'type not found' error. - $this->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('geography', 'string'); - $this->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('geometry', 'string'); - } - /** * Get the default schema grammar instance. *