diff --git a/composer.json b/composer.json index 01959bd..e8c009e 100644 --- a/composer.json +++ b/composer.json @@ -31,6 +31,9 @@ "symfony/phpunit-bridge": "^6.4" }, "autoload": { + "files": [ + "src/aliases.php" + ], "psr-4": { "DataDog\\AuditBundle\\": "src" } diff --git a/src/DBAL/Middleware/ConnectionMiddlewareForV3.php b/src/DBAL/Middleware/ConnectionMiddlewareForV3.php new file mode 100644 index 0000000..a9e1926 --- /dev/null +++ b/src/DBAL/Middleware/ConnectionMiddlewareForV3.php @@ -0,0 +1,35 @@ +auditFlushMiddleware->flushHandler !== null) { + ($this->auditFlushMiddleware->flushHandler)(); + $this->auditFlushMiddleware->flushHandler = null; + } + + // Call the parent's commit method + return parent::commit(); + } +} diff --git a/src/DBAL/Middleware/ConnectionMiddleware.php b/src/DBAL/Middleware/ConnectionMiddlewareForV4.php similarity index 92% rename from src/DBAL/Middleware/ConnectionMiddleware.php rename to src/DBAL/Middleware/ConnectionMiddlewareForV4.php index fe26309..52c1f4b 100644 --- a/src/DBAL/Middleware/ConnectionMiddleware.php +++ b/src/DBAL/Middleware/ConnectionMiddlewareForV4.php @@ -6,7 +6,7 @@ use Doctrine\DBAL\Driver\Exception; use Doctrine\DBAL\Driver\Middleware\AbstractConnectionMiddleware; -class ConnectionMiddleware extends AbstractConnectionMiddleware +class ConnectionMiddlewareForV4 extends AbstractConnectionMiddleware { public function __construct( Connection $wrappedConnection, diff --git a/src/aliases.php b/src/aliases.php new file mode 100644 index 0000000..9ea2cba --- /dev/null +++ b/src/aliases.php @@ -0,0 +1,18 @@ +