Skip to content

Commit 51311b6

Browse files
authored
Merge pull request #5 from PcComponentes/feature/NestTransactionsWithSavepoints
feat: NestTransactionsWithSavepoints argument
2 parents 2d1331f + ce47c06 commit 51311b6

File tree

5 files changed

+12
-4
lines changed

5 files changed

+12
-4
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ RUN apk add --no-cache \
99
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin/ --filename=composer
1010

1111
RUN apk add --no-cache --virtual .phpize_deps $PHPIZE_DEPS && \
12-
pecl install xdebug 3 && \
12+
pecl install xdebug-3.1.1 && \
1313
docker-php-ext-enable xdebug && \
1414
rm -rf /usr/share/php7 && \
1515
rm -rf /tmp/pear && \

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ logs:
2525

2626
.PHONY: tests
2727
tests:
28-
docker-compose run --rm -u ${UID}:${GID} ${DOCKER_PHP_SERVICE} phpunit
28+
docker-compose run --rm -u ${UID}:${GID} ${DOCKER_PHP_SERVICE} phpunit

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,10 @@
2828
"pccomponentes/coding-standard": "^1.0",
2929
"phpunit/phpunit": "^9",
3030
"dg/bypass-finals": "^1.1"
31+
},
32+
"config": {
33+
"allow-plugins": {
34+
"dealerdirect/phpcodesniffer-composer-installer": true
35+
}
3136
}
3237
}

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '3.7'
21
services:
32
php:
43
build: .

src/Driver/DBAL/DBALTransactionalConnection.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,13 @@ final class DBALTransactionalConnection implements TransactionalConnection
1010
{
1111
private Connection $DBALConnection;
1212

13-
public function __construct(Connection $DBALConnection)
13+
public function __construct(Connection $DBALConnection, bool $nestTransactionsWithSavepoints = false)
1414
{
1515
$this->DBALConnection = $DBALConnection;
16+
17+
if (true === $nestTransactionsWithSavepoints) {
18+
$this->DBALConnection->setNestTransactionsWithSavepoints(true);
19+
}
1620
}
1721

1822
public function beginTransaction(): void

0 commit comments

Comments
 (0)