Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Drupal 11 integration. #159

Merged
merged 2 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,18 @@ job-test: &job-test
- checkout

- run:
name: Build the codebase
name: Upgrade sqlite3
command: |
wget https://www.sqlite.org/2024/sqlite-autoconf-3450300.tar.gz -O /tmp/sqlite.tar.gz
tar -xzf /tmp/sqlite.tar.gz -C /tmp
cd /tmp/sqlite-autoconf-3450300
./configure CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1" --prefix=/usr/local
make && sudo make install
sudo ldconfig
echo "export LD_LIBRARY_PATH=/usr/local/lib" >> $BASH_ENV

- run:
name: Assemble the codebase
command: .devtools/assemble.sh

- run:
Expand Down Expand Up @@ -111,7 +122,7 @@ jobs:
- image: cimg/php:8.3-browsers
environment:
DRUPAL_VERSION: 11@alpha
DRUPAL_PROJECT_REPO: https://github.com/AlexSkrypnyk/drupal-project.git
DRUPAL_PROJECT_SHA: 11.x
<<: *job-test

deploy:
Expand Down
3 changes: 2 additions & 1 deletion .devtools/provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ fi
db_file="/tmp/site_${extension}.sqlite"

info "Installing Drupal into SQLite database ${db_file}."
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
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

pass "Drupal installed."

drush status
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/scaffold-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,20 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Upgrade sqlite3
run: |
wget https://www.sqlite.org/2024/sqlite-autoconf-3450300.tar.gz -O /tmp/sqlite.tar.gz
tar -xzf /tmp/sqlite.tar.gz -C /tmp
cd /tmp/sqlite-autoconf-3450300
./configure CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1" --prefix=/usr/local
make && sudo make install
sudo ldconfig

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: gd, sqlite, pdo_sqlite

- name: Check coding standards
uses: luizm/[email protected]
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,13 @@ jobs:
- name: test-php-8.3-next
php-version: 8.3
drupal-version: 11@alpha
drupal-project-repo: https://github.com/AlexSkrypnyk/drupal-project.git
drupal-project-sha: 11.x

name: ${{ matrix.name }}

env:
DRUPAL_VERSION: ${{ matrix.drupal-version }}
DRUPAL_PROJECT_SHA: ${{ matrix.drupal-project-sha }}
DRUPAL_PROJECT_REPO: ${{ matrix.drupal-project-repo }}

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

- name: Upgrade sqlite3
run: |
wget https://www.sqlite.org/2024/sqlite-autoconf-3450300.tar.gz -O /tmp/sqlite.tar.gz
tar -xzf /tmp/sqlite.tar.gz -C /tmp
cd /tmp/sqlite-autoconf-3450300
./configure CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1" --prefix=/usr/local
make && sudo make install
sudo ldconfig

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: gd, sqlite, pdo_sqlite

- name: Build the codebase
- name: Assemble the codebase
run: .devtools/assemble.sh

- name: Start built-in PHP server
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"php": ">=8.2"
},
"require-dev": {
"drupal/pathauto": "~1.0"
"drupal/role_delegation": "~1"
},
"suggest": {
"drupal/config_ignore": "Ignore certain configuration during import."
Expand Down
5 changes: 2 additions & 3 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

declare(strict_types=1);

use DrupalFinder\DrupalFinder;
use DrupalFinder\DrupalFinderComposerRuntime;
use DrupalRector\Set\Drupal10SetList;
use DrupalRector\Set\Drupal8SetList;
use DrupalRector\Set\Drupal9SetList;
Expand All @@ -32,8 +32,7 @@

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

$drupalFinder = new DrupalFinder();
$drupalFinder->locateRoot(__DIR__);
$drupalFinder = new DrupalFinderComposerRuntime();
$drupalRoot = $drupalFinder->getDrupalRoot();
$rectorConfig->autoloadPaths([
$drupalRoot . '/core',
Expand Down
Loading