Skip to content

Commit

Permalink
remove doctrine connection
Browse files Browse the repository at this point in the history
  • Loading branch information
hafezdivandari committed Dec 27, 2023
1 parent 02eef27 commit 5e99d96
Show file tree
Hide file tree
Showing 14 changed files with 0 additions and 532 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@
"ext-gmp": "*",
"ably/ably-php": "^1.0",
"aws/aws-sdk-php": "^3.235.5",
"doctrine/dbal": "^4.0",
"fakerphp/faker": "^1.21",
"guzzlehttp/guzzle": "^7.6",
"league/flysystem-aws-s3-v3": "^3.0",
Expand Down
33 changes: 0 additions & 33 deletions src/Illuminate/Database/Connection.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Carbon\CarbonInterval;
use Closure;
use DateTimeInterface;
use Doctrine\DBAL\Connection as DoctrineConnection;
use Exception;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Database\Events\QueryExecuted;
Expand Down Expand Up @@ -188,13 +187,6 @@ class Connection implements ConnectionInterface
*/
protected $beforeExecutingCallbacks = [];

/**
* The instance of Doctrine connection.
*
* @var \Doctrine\DBAL\Connection
*/
protected $doctrineConnection;

/**
* The connection resolvers.
*
Expand Down Expand Up @@ -981,8 +973,6 @@ protected function tryAgainIfCausedByLostConnection(QueryException $e, $query, $
public function reconnect()
{
if (is_callable($this->reconnector)) {
$this->doctrineConnection = null;

return call_user_func($this->reconnector, $this);
}

Expand All @@ -1009,8 +999,6 @@ public function reconnectIfMissingConnection()
public function disconnect()
{
$this->setPdo(null)->setReadPdo(null);

$this->doctrineConnection = null;
}

/**
Expand Down Expand Up @@ -1200,27 +1188,6 @@ public function useWriteConnectionWhenReading($value = true)
return $this;
}

/**
* Get the Doctrine DBAL database connection instance.
*
* @return \Doctrine\DBAL\Connection
*/
public function getDoctrineConnection()
{
if (is_null($this->doctrineConnection)) {
$driver = $this->getDoctrineDriver();

$this->doctrineConnection = new DoctrineConnection(array_filter([
'pdo' => $this->getPdo(),
'dbname' => $this->getDatabaseName(),
'driver' => $driver->getName(),
'serverVersion' => $this->getConfig('server_version'),
]), $driver);
}

return $this->doctrineConnection;
}

/**
* Get the current PDO connection.
*
Expand Down
11 changes: 0 additions & 11 deletions src/Illuminate/Database/MySqlConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace Illuminate\Database;

use Exception;
use Illuminate\Database\PDO\MySqlDriver;
use Illuminate\Database\Query\Grammars\MySqlGrammar as QueryGrammar;
use Illuminate\Database\Query\Processors\MySqlProcessor;
use Illuminate\Database\Schema\Grammars\MySqlGrammar as SchemaGrammar;
Expand Down Expand Up @@ -120,14 +119,4 @@ protected function getDefaultPostProcessor()
{
return new MySqlProcessor;
}

/**
* Get the Doctrine DBAL driver.
*
* @return \Illuminate\Database\PDO\MySqlDriver
*/
protected function getDoctrineDriver()
{
return new MySqlDriver;
}
}
28 changes: 0 additions & 28 deletions src/Illuminate/Database/PDO/Concerns/ConnectsToDatabase.php

This file was deleted.

186 changes: 0 additions & 186 deletions src/Illuminate/Database/PDO/Connection.php

This file was deleted.

19 changes: 0 additions & 19 deletions src/Illuminate/Database/PDO/MySqlDriver.php

This file was deleted.

19 changes: 0 additions & 19 deletions src/Illuminate/Database/PDO/PostgresDriver.php

This file was deleted.

19 changes: 0 additions & 19 deletions src/Illuminate/Database/PDO/SQLiteDriver.php

This file was deleted.

0 comments on commit 5e99d96

Please sign in to comment.