Skip to content

Commit c98c3de

Browse files
committed
Fixed Drupal 11.
1 parent 9770490 commit c98c3de

File tree

5 files changed

+41
-9
lines changed

5 files changed

+41
-9
lines changed

.circleci/config.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,18 @@ job-test: &job-test
2020
- checkout
2121

2222
- run:
23-
name: Build the codebase
23+
name: Upgrade sqlite3
24+
command: |
25+
wget https://www.sqlite.org/2024/sqlite-autoconf-3450300.tar.gz -O /tmp/sqlite.tar.gz
26+
tar -xzf /tmp/sqlite.tar.gz -C /tmp
27+
cd /tmp/sqlite-autoconf-3450300
28+
./configure CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1" --prefix=/usr/local
29+
make && sudo make install
30+
sudo ldconfig
31+
echo "export LD_LIBRARY_PATH=/usr/local/lib" >> $BASH_ENV
32+
33+
- run:
34+
name: Assemble the codebase
2435
command: .devtools/assemble.sh
2536

2637
- run:
@@ -111,7 +122,7 @@ jobs:
111122
- image: cimg/php:8.3-browsers
112123
environment:
113124
DRUPAL_VERSION: 11@alpha
114-
DRUPAL_PROJECT_REPO: https://github.com/AlexSkrypnyk/drupal-project.git
125+
DRUPAL_PROJECT_SHA: 11.x
115126
<<: *job-test
116127

117128
deploy:

.devtools/provision.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ fi
5454
db_file="/tmp/site_${extension}.sqlite"
5555

5656
info "Installing Drupal into SQLite database ${db_file}."
57-
drush si "${DRUPAL_PROFILE}" -y --db-url "sqlite://${db_file}" --account-name=admin install_configure_form.enable_update_status_module=NULL install_configure_form.enable_update_status_emails=NULL
57+
drush site-install "${DRUPAL_PROFILE}" -y --db-url="sqlite://localhost/${db_file}" --account-name=admin install_configure_form.enable_update_status_module=NULL install_configure_form.enable_update_status_emails=NULL
58+
5859
pass "Drupal installed."
5960

6061
drush status

.github/workflows/scaffold-test.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,20 @@ jobs:
2020
- name: Checkout code
2121
uses: actions/checkout@v4
2222

23+
- name: Upgrade sqlite3
24+
run: |
25+
wget https://www.sqlite.org/2024/sqlite-autoconf-3450300.tar.gz -O /tmp/sqlite.tar.gz
26+
tar -xzf /tmp/sqlite.tar.gz -C /tmp
27+
cd /tmp/sqlite-autoconf-3450300
28+
./configure CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1" --prefix=/usr/local
29+
make && sudo make install
30+
sudo ldconfig
31+
2332
- name: Setup PHP
2433
uses: shivammathur/setup-php@v2
34+
with:
35+
php-version: 8.3
36+
extensions: gd, sqlite, pdo_sqlite
2537

2638
- name: Check coding standards
2739
uses: luizm/action-sh-checker@v0.8.0

.github/workflows/test.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,13 @@ jobs:
3737
- name: test-php-8.3-next
3838
php-version: 8.3
3939
drupal-version: 11@alpha
40-
drupal-project-repo: https://github.com/AlexSkrypnyk/drupal-project.git
40+
drupal-project-sha: 11.x
4141

4242
name: ${{ matrix.name }}
4343

4444
env:
4545
DRUPAL_VERSION: ${{ matrix.drupal-version }}
4646
DRUPAL_PROJECT_SHA: ${{ matrix.drupal-project-sha }}
47-
DRUPAL_PROJECT_REPO: ${{ matrix.drupal-project-repo }}
4847

4948
steps:
5049
- name: Checkout code
@@ -56,12 +55,22 @@ jobs:
5655
path: /tmp/composer-cache
5756
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
5857

58+
- name: Upgrade sqlite3
59+
run: |
60+
wget https://www.sqlite.org/2024/sqlite-autoconf-3450300.tar.gz -O /tmp/sqlite.tar.gz
61+
tar -xzf /tmp/sqlite.tar.gz -C /tmp
62+
cd /tmp/sqlite-autoconf-3450300
63+
./configure CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1" --prefix=/usr/local
64+
make && sudo make install
65+
sudo ldconfig
66+
5967
- name: Setup PHP
6068
uses: shivammathur/setup-php@v2
6169
with:
6270
php-version: ${{ matrix.php-version }}
71+
extensions: gd, sqlite, pdo_sqlite
6372

64-
- name: Build the codebase
73+
- name: Assemble the codebase
6574
run: .devtools/assemble.sh
6675

6776
- name: Start built-in PHP server

rector.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
declare(strict_types=1);
1414

15-
use DrupalFinder\DrupalFinder;
15+
use DrupalFinder\DrupalFinderComposerRuntime;
1616
use DrupalRector\Set\Drupal10SetList;
1717
use DrupalRector\Set\Drupal8SetList;
1818
use DrupalRector\Set\Drupal9SetList;
@@ -32,8 +32,7 @@
3232

3333
$rectorConfig->rule(DeclareStrictTypesRector::class);
3434

35-
$drupalFinder = new DrupalFinder();
36-
$drupalFinder->locateRoot(__DIR__);
35+
$drupalFinder = new DrupalFinderComposerRuntime();
3736
$drupalRoot = $drupalFinder->getDrupalRoot();
3837
$rectorConfig->autoloadPaths([
3938
$drupalRoot . '/core',

0 commit comments

Comments
 (0)