Skip to content

Commit 08b393e

Browse files
petarbasicclaude
andauthored
fix: MCD-610: Update gitHub Actions and fix Drupal 11 compatibility (#76)
* fix: MCD-610: Update deprecated GitHub Actions syntax - Update actions/cache from v2.1.5 to v4 - Replace deprecated set-output with $GITHUB_OUTPUT Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: MCD-610: Update uselagoon image version to 25.12.0 The old version 22.2.0 no longer exists on Docker Hub. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: MCD-610: Use uselagoon version 25.9.0 for solr compatibility The solr-8-drupal image doesn't have 25.12.0, only up to 25.9.0. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: MCD-610: Build CLI image before docker compose up Newer Docker versions try to pull CLI_IMAGE from Docker Hub before building it locally. Building cli first ensures it's available. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: MCD-610: Use devsetup-docker feature branch with npm fix Temporarily use feature/MCD-610 branch of devsetup-docker which has the fix for deprecated npm options (unsafe-perm removed in npm 9+). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: MCD-610: Trigger CI rebuild with simplified Dockerfile.cli Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * ci: MCD-610: Trigger CI with restored packages in Dockerfile.cli Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * feat: MCD-610: Upgrade to Drupal 11 with PHP 8.3 Drupal 10 is end of life. Update to Drupal 11: - Update drupal/core-* packages from ^10 to ^11 - Update symfony/dotenv from ^5.4 to ^7.0 (Drupal 11 uses Symfony 7) - Update PHP platform version from 8.1 to 8.3 - Update GitHub Actions PHP version to 8.3 - Update Docker PHP version to 8.3 - Update version check from "Drupal 10" to "Drupal 11" Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: MCD-610: Update development.settings.php for Drupal 11 Replace deprecated assertion handler with ini_set for Drupal 11: - Remove assert_options(ASSERT_ACTIVE, TRUE) - Remove \Drupal\Component\Assertion\Handle::register() - Add ini_set('zend.assertions', 1) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * docs: MCD-610: Update version compatibility for Drupal 11 Update README to reflect Drupal 11 requirement with PHP 8.3+. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * fix: MCD-610: Use devsetup-docker 3.x branch (PR merged) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 3bea498 commit 08b393e

5 files changed

Lines changed: 24 additions & 18 deletions

File tree

.github/workflows/test-drupal-setup.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v3
1717
- name: Setup PHP
18-
run: |
19-
sudo update-alternatives --set php /usr/bin/php8.1
18+
uses: drunomics/setup-php@v2
19+
with:
20+
php-version: '8.3'
2021
- name: "Determine composer cache directory"
2122
id: "determine-composer-cache-directory"
22-
run: "echo \"::set-output name=directory::$(composer config cache-dir)\""
23+
run: echo "directory=$(composer config cache-dir)" >> $GITHUB_OUTPUT
2324
- name: "Cache dependencies installed with composer"
24-
uses: actions/cache@v2.1.5
25+
uses: actions/cache@v4
2526
with:
2627
path: "${{ steps.determine-composer-cache-directory.outputs.directory }}"
2728
key: ${{ runner.os }}-composer-v1-${{ hashFiles('./composer.json') }}
@@ -40,6 +41,7 @@ jobs:
4041
shell: 'script -q -e -c "bash {0}"'
4142
run: |
4243
export COMPOSE_DEFAULT_USER=$(id -u $USER)
44+
docker compose build cli
4345
docker compose up -d
4446
echo "Waiting for mysql to come up..." && docker exec -it $(docker compose ps -q cli) /bin/bash -c "while ! echo exit | nc mariadb 3306; do sleep 1; done" >/dev/null
4547
- name: Install the project
@@ -48,4 +50,4 @@ jobs:
4850
docker compose exec cli phapp install --no-build
4951
- name: Check connection and response of the site
5052
run: |
51-
curl -v http://example.drupal-project.localdev.space | grep "Drupal 10"
53+
curl -v http://example.drupal-project.localdev.space | grep "Drupal 11"

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Builds upon https://github.com/drupal-composer/drupal-project.
77

88
## Version compatibility
99

10-
| Git branch/tag: | Drupal core: |
11-
|--- | --- |
12-
| 5.x | Drupal 8 |
13-
| 6.x | Drupal 9+ |
10+
| Git branch/tag: | Drupal core: | PHP version: |
11+
|--- | --- | --- |
12+
| 5.x | Drupal 8 | 7.x |
13+
| 6.x | Drupal 11+ | 8.3+ |
1414

1515
## Usage
1616

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
],
1212
"require": {
1313
"cweagans/composer-patches": "^1.7.2",
14-
"drupal/core-composer-scaffold": "^10",
15-
"drupal/core-recommended": "^10",
14+
"drupal/core-composer-scaffold": "^11",
15+
"drupal/core-recommended": "^11",
1616
"drush/drush": "*",
1717
"oomphinc/composer-installers-extender": "^2.0.1",
18-
"symfony/dotenv": "^5.4.22"
18+
"symfony/dotenv": "^7.0"
1919
},
2020
"require-dev": {
21-
"drupal/core-dev": "^10",
21+
"drupal/core-dev": "^11",
2222
"drunomics/playwright-drupal-utils": "^1.0.0"
2323
},
2424
"conflict": {
@@ -133,7 +133,7 @@
133133
},
134134
"config": {
135135
"platform": {
136-
"php": "8.1"
136+
"php": "8.3"
137137
},
138138
"sort-packages": true,
139139
"preferred-install": {

scripts/init-devsetup-docker.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ if [[ $PROJECT_ADD_DEVSETUP_DOCKER = 1 ]]; then
2828
php process-replacements.php
2929
rm -rf devsetup-tmp process-replacements.php
3030
echo \
31-
'COMPOSE_AMAZEEIO_VERSION=22.2.0
32-
COMPOSE_AMAZEEIO_PHP_VERSION=8.1
31+
'COMPOSE_AMAZEEIO_VERSION=25.9.0
32+
COMPOSE_AMAZEEIO_PHP_VERSION=8.3
3333
' >> .env-defaults
3434
fi

web/sites/development.settings.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<?php
22

3-
assert_options(ASSERT_ACTIVE, TRUE);
4-
\Drupal\Component\Assertion\Handle::register();
3+
/**
4+
* @file
5+
* Contains Drupal settings for development sites.
6+
*/
7+
8+
ini_set('zend.assertions', 1);
59

610
/**
711
* Enable local development services.

0 commit comments

Comments
 (0)