Skip to content

Commit

Permalink
Add support for Drupal 10
Browse files Browse the repository at this point in the history
not enabled by default but can be enabled

highlighting some current incompatibilities and alpha/beta usage needed for it
  • Loading branch information
andytson-inviqa committed Mar 17, 2023
1 parent bef9f5d commit 9daf539
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 14 deletions.
15 changes: 15 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,23 @@ pipeline {
}
steps {
sh './test php static'
sh './test drupal10 static'
sh './test drupal9 static'
sh './test drupal8 static'
sh './test akeneo6 static'
sh './test akeneo5 static'
sh './test akeneo4 static'
sh './test wordpress static'
sh './test php dynamic'
sh './test drupal10 dynamic'
sh './test drupal9 dynamic'
sh './test drupal8 dynamic'
sh './test akeneo6 dynamic'
sh './test akeneo5 dynamic'
sh './test akeneo4 dynamic'
sh './test wordpress dynamic'
sh './test php dynamic mutagen'
sh './test drupal10 dynamic mutagen'
sh './test drupal9 dynamic mutagen'
sh './test drupal8 dynamic mutagen'
sh './test akeneo6 dynamic mutagen'
Expand All @@ -85,6 +88,10 @@ pipeline {
when { expression { return isHarnessChange(['base']) } }
steps { sh './test php static' }
}
stage('Drupal 10') {
when { expression { return isHarnessChange(['drupal']) } }
steps { sh './test drupal10 static' }
}
stage('Drupal 9') {
when { expression { return isHarnessChange(['drupal']) } }
steps { sh './test drupal9 static' }
Expand Down Expand Up @@ -114,6 +121,10 @@ pipeline {
when { expression { return isHarnessChange(['base']) } }
steps { sh './test php dynamic' }
}
stage('Drupal 10 Dynamic') {
when { expression { return isHarnessChange(['drupal']) } }
steps { sh './test drupal10 dynamic' }
}
stage('Drupal 9 Dynamic') {
when { expression { return isHarnessChange(['drupal']) } }
steps { sh './test drupal9 dynamic' }
Expand Down Expand Up @@ -143,6 +154,10 @@ pipeline {
when { expression { return isHarnessChange(['base']) } }
steps { sh './test php dynamic mutagen' }
}
stage('Drupal 10 Mutagen') {
when { expression { return isHarnessChange(['drupal']) } }
steps { sh './test drupal10 dynamic mutagen' }
}
stage('Drupal 9 Mutagen') {
when { expression { return isHarnessChange(['drupal']) } }
steps { sh './test drupal9 dynamic mutagen' }
Expand Down
35 changes: 24 additions & 11 deletions src/drupal/application/skeleton/composer.json.twig
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"composer/installers": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"fenetikm/autoload-drupal": true,
"oomphinc/composer-installers-extender": true
"oomphinc/composer-installers-extender": true,
"phpstan/extension-installer": false
}
},
"repositories": {
Expand All @@ -31,42 +32,48 @@
}
},
"require": {
"php": ">= {{ @('php.version') }}",
{% if version_compare(@('drupal.major_version'), '9', '>=') %}
"php": ">= 8.0",
"composer/installers": "^2.1",
"cweagans/composer-patches": "^1.7",
"drupal/admin_toolbar": "^3.1",
{% if version_compare(@('drupal.major_version'), '10', '>=') %}
"drupal/core-composer-scaffold": "^10.0",
"drupal/core-recommended": "^10.0",
{% else %}
"drupal/core-composer-scaffold": "^9.4",
"drupal/core-recommended": "^9.4",
{% endif %}
"drupal/ctools": "^4.0",
"drupal/environment_indicator": "^4.0",
"drupal/field_group": "^3.2",
"drupal/hook_event_dispatcher": "^3.3",
"drupal/hook_event_dispatcher": "^3.3 || 4.0.0-alpha2",
{% if @('services.varnish.enabled') %}
"drupal/http_cache_control": "^2.0",
{% endif %}
"drupal/inline_entity_form": "^1.0-rc12",
"drupal/linkit": "~6.0.0@beta",
"drupal/login_emailusername": "2.0",
"drupal/login_emailusername": "^2.1",
"drupal/menu_admin_per_menu": "1.5",
"drupal/metatag": "1.22",
"drupal/pathauto": "^1.11",
"drupal/purge": "^3.4",
"drupal/redirect": "1.8",
{% if version_compare(@('drupal.major_version'), '10', '<') %}
"drupal/roleassign": "^1.0.0@beta",
"drupal/seckit": "2.0",
{% endif %}
"drupal/seckit": "^2.0",
"drupal/stage_file_proxy": "^2.0",
"drupal/taxonomy_access_fix": "3.3",
"drupal/taxonomy_access_fix": "3.3 || 4.0.0@beta",
"drupal/token": "^1.11",
"drupal/ultimate_cron": "~2.0.0@alpha",
{% if @('services.varnish.enabled') %}
{% if version_compare(@('drupal.major_version'), '10', '<') and @('services.varnish.enabled') %}
"drupal/varnish_purge": "^2.1",
{% endif %}
"drush/drush": "^11.1",
"fenetikm/autoload-drupal": "dev-master#4503484bf2d78e6d739fe13324ab3e6b96d7c244",
"oomphinc/composer-installers-extender": "^2.0"
{% else %}
"php": ">= 7.4",
"composer/installers": "^1.0",
"cweagans/composer-patches": "^1.5.0",
"drupal/admin_toolbar": "^1.0",
Expand All @@ -90,7 +97,7 @@
"drupal/roleassign": "^1.0@alpha",
"drupal/seckit": "1.1",
"drupal/stage_file_proxy": "^1.0@alpha",
"drupal/taxonomy_access_fix": "2.6",
"drupal/taxonomy_access_fix": "^3.3 || ~4.0.0@beta",
"drupal/token": "1.5",
"drupal/ultimate_cron": "~2.0.0@alpha",
{% if @('services.varnish.enabled') %}
Expand All @@ -104,10 +111,16 @@
"require-dev": {
"behat/behat": "^3.7",
"friends-of-behat/mink-extension": "^2.7",
"behat/mink-goutte-driver": "^1.3",
"behat/mink-goutte-driver": "^1.3 || ^2.0",
"dmore/behat-chrome-extension": "^1.4",
"dmore/chrome-mink-driver": "^2.9",
{% if version_compare(@('drupal.major_version'), '9', '>=') %}
{% if version_compare(@('drupal.major_version'), '10', '>=') %}
"drupal/core-dev": "^10.0",
"drupal/devel": "^5.1",
"drupal/drupal-extension": "~5.0.0@alpha",
"phpunit/phpunit": "^9.6",
"phpspec/prophecy-phpunit": "^2",
{% elseif version_compare(@('drupal.major_version'), '9', '>=') %}
"drupal/core-dev": "^9.4",
"drupal/devel": "^4.1",
"drupal/drupal-extension": "^4.2",
Expand Down
2 changes: 1 addition & 1 deletion src/drupal/harness.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ attributes:
cli:
ini:
opcache.file_cache_only: '0'
version: "= version_compare(@('drupal.major_version'), '9', '>=') ? '8.0' : '7.4'"
version: "= version_compare(@('drupal.major_version'), '10', '>=') ? '8.1' : (version_compare(@('drupal.major_version'), '9', '>=') ? '8.0' : '7.4')"
persistence:
enabled: false
drupal:
Expand Down
6 changes: 4 additions & 2 deletions test
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ function main()
akeneo_version=6
harness="akeneo"
fi

if [[ "$harness" =~ ^(drupal9)$ ]]; then
if [[ "$harness" =~ ^(drupal10)$ ]]; then
drupal_version=10
harness="drupal"
elif [[ "$harness" =~ ^(drupal9)$ ]]; then
drupal_version=9
harness="drupal"
elif [[ "$harness" =~ ^(drupal8)$ ]]; then
Expand Down

0 comments on commit 9daf539

Please sign in to comment.