Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f1ca640
Added Drupal 11 support
stephen-cox Dec 18, 2024
cd20966
fix: allow paratest which is compatible with latest version of phpuni…
millnut Dec 24, 2024
46f4a6a
fix: override fontawesome with dev version
millnut Dec 25, 2024
a2ba10e
fix: update composer installers to fix deprecated warnings
millnut Dec 25, 2024
9e5f82c
fix: add patch to php-htmldiff to fix PHP 8.4 errors in PHPUnit
millnut Dec 25, 2024
085770f
fix: update phpunit config to match drupal core
millnut Dec 25, 2024
ec55d88
fix: update phpunit config to match drupal core
millnut Dec 25, 2024
22395b2
fix: update phpunit config to match drupal core
millnut Dec 25, 2024
2865e44
fix: remove geo entity composer alias now there is a version with D11…
millnut Dec 31, 2024
67be6c8
feat: add separate phpunit file for D11
millnut Jan 10, 2025
fd6eec4
feat: fontawesome now has a D11 release so remove the repo usage
millnut Jan 23, 2025
ac9dc2d
fix: remove patch for caxy/php-htmldiff as latest version now support…
millnut Jan 23, 2025
9c79009
Updated Github workflow to test with Drupal 11
stephen-cox Feb 7, 2025
4aab87a
Tweaks for D11 support
stephen-cox Feb 7, 2025
2cdec57
Adjust Github workflow to workaround dev package install failure
stephen-cox Feb 7, 2025
6050133
fix: only phpcs and phpstan once and for now set to core 10 and PHP 8.4
millnut Feb 8, 2025
dfd40fb
fix: add composer-drupal-lenient for facets_form as no D11 release
millnut Feb 8, 2025
7335bb6
fix: add specific drupal core install as project can be either 10 or …
millnut Feb 10, 2025
f5327ff
fix: add specific drupal core install as project can be either 10 or …
millnut Feb 10, 2025
0bd7b68
fix: add specific drupal core install as project can be either 10 or …
millnut Feb 10, 2025
a05578f
fix: run phpstan and phpcs on D11
millnut Feb 11, 2025
9ae4146
fix: ignore tablefield 2.4 for tablefield 3.0
millnut Feb 13, 2025
8fe1b98
Preparations for a D11 release
stephen-cox Mar 4, 2025
77244fe
Merge branch 'feature/drupal-11-support' of github.com:localgovdrupal…
stephen-cox Mar 4, 2025
c92ecfa
Merged 3.x
stephen-cox Mar 4, 2025
15fedf9
Update Maria DB to 10.6 in ddev, for Drupal 11.
finnlewis Mar 11, 2025
5551faa
Remove composer alias to D11 profile
stephen-cox Mar 11, 2025
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
2 changes: 1 addition & 1 deletion .ddev/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ additional_hostnames: []
additional_fqdns: []
database:
type: mariadb
version: "10.3"
version: "10.6"
nfs_mount_enabled: false
mutagen_enabled: false
use_dns_when_possible: true
Expand Down
73 changes: 51 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ on:
push:
branches:
- '3.x'
- '3.2.x'
pull_request:
branches:
- '3.x'
- '3.2.x'
schedule:
- cron: '0 7 * * *'
workflow_dispatch:
Expand All @@ -28,14 +30,25 @@ jobs:
strategy:
fail-fast: false
matrix:
localgov-version:
- '3.x'
drupal-version:
- '~10.0'
php-version:
- '8.1'
- '8.2'
- '8.3'
include:
- localgov-version: '3.x'
drupal-version: '~10.0'
php-version: '8.1'
- localgov-version: '3.x'
drupal-version: '~10.0'
php-version: '8.2'
- localgov-version: '3.x'
drupal-version: '~10.0'
php-version: '8.3'
- localgov-version: '3.x'
drupal-version: '~10.0'
php-version: '8.4'
- localgov-version: '3.x'
drupal-version: '~11.0'
php-version: '8.3'
- localgov-version: '3.x'
drupal-version: '~11.0'
php-version: '8.4'

steps:
- name: Save git branch and git repo names to env if this is not a pull request
Expand Down Expand Up @@ -78,10 +91,14 @@ jobs:
ref: php${{ matrix.php-version }}

- name: Create LocalGov Drupal project
run: composer create-project --stability dev localgovdrupal/localgov-project:${COMPOSER_REF} ./html
run: |
composer create-project --stability dev --no-install localgovdrupal/localgov-project:${COMPOSER_REF} ./html
composer require --working-dir=./html --no-install --with-all-dependencies drupal/core-recommended:${{ matrix.drupal-version }} drupal/core-composer-scaffold:${{ matrix.drupal-version }} drupal/core-project-message:${{ matrix.drupal-version }} drupal/core-dev:${{ matrix.drupal-version }}
composer install --working-dir=./html

- name: Obtain all dev dependencies for LocalGov Drupal
run: jq --raw-output '.packages[] | select(.name | startswith("localgovdrupal/")) | ."require-dev" | values | to_entries[] | @sh "\(.key):\(.value)"' ./html/composer.lock | sort | uniq | xargs composer --working-dir=./html require --dev --no-interaction
run: |
jq --raw-output '.packages[] | select(.name | startswith("localgovdrupal/")) | ."require-dev" | values | to_entries[] | @sh "\(.key):\(.value)"' ./html/composer.lock | sort | uniq | xargs composer --working-dir=./html require --dev --no-interaction

phpcs:
name: Coding standards checks
Expand All @@ -94,9 +111,9 @@ jobs:
localgov-version:
- '3.x'
drupal-version:
- '~10.0'
- '~11.0'
php-version:
- '8.3'
- '8.4'

steps:
- name: Cached workspace
Expand Down Expand Up @@ -128,9 +145,9 @@ jobs:
localgov-version:
- '3.x'
drupal-version:
- '~10.0'
- '~11.0'
php-version:
- '8.3'
- '8.4'

steps:
- name: Cached workspace
Expand All @@ -150,6 +167,7 @@ jobs:
run: |
cd html
./bin/phpstan analyse -c ./phpstan.neon ./web/modules/contrib/localgov* ./web/profiles/contrib/localgov* ./web/themes/contrib/localgov*

phpunit:
name: PHPUnit tests
needs: build
Expand All @@ -158,14 +176,25 @@ jobs:
strategy:
fail-fast: false
matrix:
localgov-version:
- '3.x'
drupal-version:
- '~10.0'
php-version:
- '8.1'
- '8.2'
- '8.3'
include:
- localgov-version: '3.x'
drupal-version: '~10.0'
php-version: '8.1'
- localgov-version: '3.x'
drupal-version: '~10.0'
php-version: '8.2'
- localgov-version: '3.x'
drupal-version: '~10.0'
php-version: '8.3'
- localgov-version: '3.x'
drupal-version: '~10.0'
php-version: '8.4'
- localgov-version: '3.x'
drupal-version: '~11.0'
php-version: '8.3'
- localgov-version: '3.x'
drupal-version: '~11.0'
php-version: '8.4'

steps:
- name: Clone Drupal container
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Ignore directories generated by Composer
/drush/contrib/
/recipes/
/vendor/
/web/core/
/web/modules/contrib/
Expand Down
6 changes: 3 additions & 3 deletions .lando.dist.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: localgov
recipe: drupal10
recipe: drupal11
config:
webroot: web
php: '8.1'
database: mariadb:10.6
php: '8.3'
database: mariadb:10.11
proxy:
mailhog:
- mail.localgov.lndo.site
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,18 @@
}
},
"require": {
"composer/installers": "^1.10",
"composer/installers": "^1.10 || ^2.3",
"cweagans/composer-patches": "^1.6",
"drupal/core-composer-scaffold": "^10.3",
"drupal/core-recommended": "^10.3",
"drupal/core-composer-scaffold": "^10.3 || ^11.0",
"drupal/core-recommended": "^10.3 || ^11.0",
"localgovdrupal/localgov": "^3.0",
"localgovdrupal/localgov_search_solr": "^1.1",
"wikimedia/composer-merge-plugin": "^2.1"
},
"require-dev": {
"brianium/paratest": "^6.0",
"brianium/paratest": "^6.0 || ^7.3.1",
"drupal/coder": "^8.3",
"drupal/core-dev": "^10.3",
"drupal/core-dev": "^10.3 || ^11.0",
"mglaman/phpstan-drupal": "^1.0",
"phpspec/prophecy-phpunit": "^2",
"phpstan/phpstan": "^1.0",
Expand Down
64 changes: 64 additions & 0 deletions phpunit.d11.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit bootstrap="web/core/tests/bootstrap.php" colors="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutChangesToGlobalState="true"
failOnRisky="true"
failOnWarning="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerWarnings="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
cacheResult="false">

<php>
<!-- Set error reporting to E_ALL. -->
<ini name="error_reporting" value="32767"/>
<!-- Do not limit the amount of memory tests take to run. -->
<ini name="memory_limit" value="-1"/>
<!-- Example SIMPLETEST_BASE_URL value: http://localhost -->
<env name="SIMPLETEST_BASE_URL" value="http://localgov.lndo.site"/>
<!-- Example SIMPLETEST_DB value: mysql://username:password@localhost/databasename#table_prefix -->
<env name="SIMPLETEST_DB" value="mysql://database:database@database/database"/>
<!-- Example BROWSERTEST_OUTPUT_DIRECTORY value: /path/to/webroot/sites/simpletest/browser_output -->
<env name="BROWSERTEST_OUTPUT_DIRECTORY" value=""/>
<!-- To have browsertest output use an alternative base URL. For example if
SIMPLETEST_BASE_URL is an internal DDEV URL, you can set this to the
external DDev URL so you can follow the links directly.
-->
<env name="BROWSERTEST_OUTPUT_BASE_URL" value=""/>
</php>

<extensions>
<!-- Functional tests HTML output logging. -->
<bootstrap class="Drupal\TestTools\Extension\HtmlLogging\HtmlOutputLogger">
<!-- The directory where the browser output will be stored. If a relative
path is specified, it will be relative to the current working directory
of the process running the PHPUnit CLI. In CI environments, this can be
overridden by the value set for the "BROWSERTEST_OUTPUT_DIRECTORY"
environment variable.
-->
<parameter name="outputDirectory" value="sites/simpletest/browser_output"/>
<!-- By default browser tests print the individual links in the test run
report. To avoid overcrowding the output in CI environments, you can
set the "verbose" parameter or the "BROWSERTEST_OUTPUT_VERBOSE"
environment variable to "false". In GitLabCI, the output is saved
anyway as an artifact that can be browsed or downloaded from Gitlab.
-->
<parameter name="verbose" value="true"/>
</bootstrap>
</extensions>

<testsuites>
<testsuite name="profile">
<directory>web/profiles/contrib/localgov</directory>
</testsuite>
<testsuite name="modules">
<directory>web/modules/contrib/localgov_*</directory>
</testsuite>
<testsuite name="themes">
<directory>./web/themes/contrib/localgov_*</directory>
</testsuite>
</testsuites>

</phpunit>
2 changes: 2 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutChangesToGlobalState="true"
failOnWarning="true"
cacheResult="false"
printerClass="\Drupal\Tests\Listeners\HtmlOutputPrinter">

<php>
Expand Down
Loading