Skip to content

Commit

Permalink
Fix (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
mondrake committed Oct 27, 2023
1 parent 76bf523 commit fc74b6e
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 25 deletions.
36 changes: 14 additions & 22 deletions .github/workflows/pr.yml
Expand Up @@ -10,49 +10,42 @@ env:
SIMPLETEST_BASE_URL: "http://localhost:8080"
PHPUNIT_SKIP_CLASS: '[
"Drupal\\KernelTests\\Core\\Cache\\ApcuBackendTest",
"Drupal\\Tests\\file\\Functional\\FileAddPermissionsUpdateTest"
"Drupal\\Tests\\file\\Functional\\FileAddPermissionsUpdateTest",
"Drupal\\Tests\\file\\Functional\\DownloadTest"
]'

jobs:

#################################

mysql-mysqli:
name: "MySql with mysqli"
runs-on: ubuntu-latest
sqlite-pdo:
name: "SQLite with PDO"
runs-on: ubuntu-20.04
env:
DRUDBAL_ENV: "dbal/mysqli"
DBAL_URL: "mysqli://root:@0.0.0.0:3306/drudbal"
SIMPLETEST_DB: "dbal://root:@0.0.0.0:3306/drudbal?module=drudbal&dbal_driver=mysqli"
DRUDBAL_ENV: "dbal/sqlite/file"
DBAL_URL: "sqlite://localhost/sites/drudbal.sqlite"
SIMPLETEST_DB: "dbal://localhost/sites/drudbal.sqlite?module=drudbal&dbal_driver=pdo_sqlite"

strategy:
fail-fast: false
matrix:
php-version:
- "8.1"
- "8.2"
test-args:
- "--group Database"
# - "-v --group Cache"
# - "-v --group Config"
# - "-v --group Entity"
# - "-v --group Installer"

services:
mysql:
image: "mysql:5.7"
options: >-
-e MYSQL_ALLOW_EMPTY_PASSWORD=yes
-e MYSQL_DATABASE=drudbal
ports:
- "3306:3306"
- "--group Entity"
# - "--group Cache,Config"
# - "--group field,Field"
# - "--group file"
# - "--group views"

steps:
- name: Install PHP
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
coverage: "none"
extensions: "mysqli"
ini-values: "zend.assertions=1"

- name: Checkout Drupal
Expand All @@ -69,7 +62,6 @@ jobs:
- name: Install Composer dependencies
run: |
composer install --no-progress --ansi
composer config --no-plugins allow-plugins.composer/package-versions-deprecated true
- name: Composer require DruDbal from local staging
run: |
Expand Down
4 changes: 1 addition & 3 deletions src/Driver/Database/dbal/TransactionManager.php
Expand Up @@ -45,9 +45,7 @@ protected function releaseClientSavepoint(string $name): bool {
// because the transaction is no longer active. In this case we rollback
// to root and cleanup.
$connection->getDbalExtension()->delegateRollBack();
$this->resetStack();
$this->setConnectionTransactionState(ClientConnectionTransactionState::Voided);
$this->processPostTransactionCallbacks();
$this->voidClientTransaction();
return TRUE;
}

Expand Down
6 changes: 6 additions & 0 deletions tests/github/drupal_patch.sh
Expand Up @@ -9,3 +9,9 @@ git apply -v ./drudbal_staging/tests/github/2992274-local.patch

#3389397 WebDriverCurlService::execute() needs a @return annotation
curl https://git.drupalcode.org/project/drupal/-/merge_requests/4865.diff | git apply -v

#3397302 Notation of placeholders in SqlContentEntityStorageRevisionDataCleanupTest is incorrect
curl https://git.drupalcode.org/project/drupal/-/merge_requests/5158.diff | git apply -v

#3396559 Only set content-length header in specific situations
curl https://git.drupalcode.org/project/drupal/-/merge_requests/5121.diff | git apply -v

0 comments on commit fc74b6e

Please sign in to comment.