Skip to content

Commit

Permalink
Drupal11 readiness (#1873)
Browse files Browse the repository at this point in the history
* Drupal 11 compatibility fixes for ACMS modules.
---------

Co-authored-by: Rajeshreeputra <[email protected]>
Co-authored-by: Vishal Khode <[email protected]>
Co-authored-by: Ankit Pathak <[email protected]>
Co-authored-by: Ankit Pathak <[email protected]>
Co-authored-by: Vishal Khode <[email protected]>
  • Loading branch information
6 people authored Sep 12, 2024
1 parent 868435f commit 3fb7173
Show file tree
Hide file tree
Showing 75 changed files with 2,336 additions and 4,046 deletions.
55 changes: 45 additions & 10 deletions .github/workflows/acquia_cms_ci.workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,20 @@ jobs:
#coverage: xdebug
- name: Execute PHPStan
run: |
# Remove Acquia CMS modules.
# @todo: Remove module from below which you want to make Drupal 11 compatible.
composer remove "drupal/acquia_cms_headless" --no-install --no-update
# Remove acquia_cms_headless module.
rm -fr modules/acquia_cms_headless
# Unset the repository path.
composer config repositories.acquia_cms_headless --unset
rm composer.lock
composer install
./vendor/bin/phpstan analyze
integrated_tests:
if: ${{ github.event_name == 'pull_request' }}
name: ${{ matrix.acms_job }} (${{ matrix.orca-job }})
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
env:
# Site test artifacts.
# ACMS_DB_ARTIFACT: "/home/runner/work/acquia_cms/acquia_cms/tests/acms.sql.gz"
Expand Down Expand Up @@ -131,6 +138,7 @@ jobs:
fail-fast: false
matrix:
orca-job:
- INTEGRATED_TEST_ON_LATEST_LTS
- ISOLATED_TEST_ON_CURRENT
acms_job:
- integrated_php_unit_tests
Expand Down Expand Up @@ -163,6 +171,13 @@ jobs:
# aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Before Install
run: |
# Remove Acquia CMS modules.
# @todo: Remove module from below which you want to make Drupal 11 compatible.
composer remove "drupal/acquia_cms_headless" --no-install --no-update
# Remove acquia_cms_headless module.
rm -fr modules/acquia_cms_headless
# Unset the repository path.
composer config repositories.acquia_cms_headless --unset
# Update the CI by adding patches without pinning the following modules.
#composer require "drupal/facets:^2.0.6" --no-update --no-install -d modules/acquia_cms_search
Expand Down Expand Up @@ -200,8 +215,8 @@ jobs:
../orca/bin/ci/after_script.sh
isolated_tests:
if: ${{ github.event_name == 'pull_request' }}
name: acquia_cms (${{ matrix.modules }})
runs-on: ubuntu-latest
name: acquia_cms (${{ matrix.modules }}) on (${{ matrix.orca-job }})
runs-on: ubuntu-24.04
env:
# Set ORCA related environment variables.
ORCA_SUT_NAME: acquia/acquia_cms
Expand Down Expand Up @@ -230,6 +245,7 @@ jobs:
fail-fast: false
matrix:
orca-job:
- INTEGRATED_TEST_ON_LATEST_LTS
- ISOLATED_TEST_ON_CURRENT
#php-version: [ "8.1" ]
modules:
Expand All @@ -238,16 +254,16 @@ jobs:
- acquia_cms_common
- acquia_cms_document
- acquia_cms_event
- acquia_cms_headless
# - acquia_cms_headless
- acquia_cms_image
- acquia_cms_page
- acquia_cms_person
- acquia_cms_place
- acquia_cms_search
- acquia_cms_site_studio
# - acquia_cms_site_studio
- acquia_cms_tour
- acquia_cms_video
- sitestudio_config_management
# - sitestudio_config_management
steps:
- uses: actions/checkout@v3
- name: Use Node.js 12.13.1
Expand All @@ -265,6 +281,13 @@ jobs:
curl https://gist.githubusercontent.com/rajeshreeputra/170586f217b422eb9cdfd9ca9457a2e3/raw/c2f277ba9005b91d7f662cacf37b3940a66a9b8c/sut-path-reposories.patch | git -C ../orca apply
- name: Before Install
run: |
# Remove Acquia CMS modules.
# @todo: Remove module from below which you want to make Drupal 11 compatible.
composer remove "drupal/acquia_cms_headless" --no-install --no-update
# Remove acquia_cms_headless module.
rm -fr modules/acquia_cms_headless
# Unset the repository path.
composer config repositories.acquia_cms_headless --unset
# Remove all ExistingSite test in CI.
find tests/src -type f -name "*Test.php" -path "*/ExistingSite*/*" -exec rm -fr '{}' ';'
# Remove all PHPUnit test files, excluding the current module's PHPUnit tests.
Expand Down Expand Up @@ -326,11 +349,15 @@ jobs:
fail-fast: false
matrix:
orca-job:
- INTEGRATED_TEST_ON_PREVIOUS_MINOR
- INTEGRATED_TEST_ON_LATEST_LTS
# - INTEGRATED_TEST_ON_PREVIOUS_MINOR
- ISOLATED_TEST_ON_CURRENT
php-version:
- 8.1
- 8.3
exclude:
- php-version: 8.1
orca-job: ISOLATED_TEST_ON_CURRENT
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
Expand All @@ -350,7 +377,8 @@ jobs:
composer self-update
composer create-project --no-dev --ignore-platform-req=php acquia/orca ../orca "$ORCA_VERSION" -n
curl https://gist.githubusercontent.com/rajeshreeputra/170586f217b422eb9cdfd9ca9457a2e3/raw/c2f277ba9005b91d7f662cacf37b3940a66a9b8c/sut-path-reposories.patch | git -C ../orca apply
curl https://gist.githubusercontent.com/vishalkhode1/342a0eee801e51f48b4d9701749c1c94/raw/orca-oldest-support.patch | git -C ../orca apply
# Remove Drupal core 9.5.x as oldest support in favor of 10.3.x
# curl https://gist.githubusercontent.com/vishalkhode1/342a0eee801e51f48b4d9701749c1c94/raw/orca-oldest-support.patch | git -C ../orca apply
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
Expand All @@ -359,9 +387,16 @@ jobs:
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
- name: Before Install
run: |
# Remove Acquia CMS modules.
# @todo: Remove module from below which you want to make Drupal 11 compatible.
composer remove "drupal/acquia_cms_headless" --no-install --no-update
# Remove acquia_cms_headless module.
rm -fr modules/acquia_cms_headless
# Unset the repository path.
composer config repositories.acquia_cms_headless --unset
# Added below in CI to test acquia_cms on Drupal Core >=9.5.
composer require "drupal/core:>=9.5" --no-update --no-install -d modules/acquia_cms_common
sed -i 's/^core_version_requirement.*/core_version_requirement: ">=9.5"/' modules/acquia_cms_common/acquia_cms_common.info.yml
# composer require "drupal/core:>=9.5" --no-update --no-install -d modules/acquia_cms_common
# sed -i 's/^core_version_requirement.*/core_version_requirement: ">=9.5"/' modules/acquia_cms_common/acquia_cms_common.info.yml
# Remove all PHPunit tests from acquia_cms modules.
find modules/*/tests tests/src -type f -name "*Test.php" -exec rm -fr '{}' ';'
Expand Down
38 changes: 27 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,32 @@
"drupal/acquia_cms_audio": "dev-develop",
"drupal/acquia_cms_component": "dev-develop",
"drupal/acquia_cms_dam": "dev-develop",
"drupal/acquia_cms_headless": "dev-develop",
"drupal/acquia_cms_site_studio": "dev-develop",
"drupal/acquia_cms_starter": "dev-develop",
"drupal/acquia_cms_toolbar": "dev-develop",
"drupal/acquia_cms_tour": "dev-develop",
"drupal/consumer_image_styles": "^4.0",
"drupal/gin": "^3.0@RC",
"drupal/google_analytics": "^4.0",
"drupal/google_analytics": "dev-3430780-automated-drupal-11",
"drupal/google_tag": "^2.0",
"drupal/honeypot": "^2.1",
"drupal/recaptcha": "^3.2",
"drupal/reroute_email": "^2.2",
"drupal/shield": "^1.7",
"drupal/sitestudio_config_management": "dev-develop",
"drupal/sitestudio_gin": "^1.0",
"drush/drush": "^10 || ^11 || ^12",
"drupal/sitestudio_gin": "dev-3434617-automated-drupal-11",
"drush/drush": "^10 || ^11 || ^12 || ^13",
"mnsami/composer-custom-directory-installer": "^2.0"
},
"require-dev": {
"acquia/coding-standards": "^1.0",
"axelerant/drupal-quality-checker": "~1.3.0",
"drupal/core-composer-scaffold": "^9.0.0 || ^10",
"drupal/core-dev": "^9 || ^10",
"drupal/core-composer-scaffold": "^10 || ^11",
"drupal/core-dev": "^10 || ^11",
"ergebnis/composer-normalize": "^2.31.0",
"mglaman/drupal-check": "^1.4",
"oomphinc/composer-installers-extender": "^1.1 || ^2",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.4.0",
"phpunit/phpunit": "^9.4.0 || ^10",
"weitzman/drupal-test-traits": "^2"
},
"repositories": {
Expand Down Expand Up @@ -235,6 +233,26 @@
}
}
},
"acquia_dam": {
"type": "vcs",
"url": "https://git.drupalcode.org/issue/acquia_dam-3471717.git"
},
"consumer_image_styles": {
"type": "vcs",
"url": "https://git.drupalcode.org/issue/consumer_image_styles-3429496.git"
},
"google_analytics": {
"type": "vcs",
"url": "https://git.drupalcode.org/issue/google_analytics-3430780.git"
},
"config_filter": {
"type": "vcs",
"url": "https://git.drupalcode.org/issue/config_filter-3428542.git"
},
"sitestudio_gin": {
"type": "vcs",
"url": "https://git.drupalcode.org/issue/sitestudio_gin-3434617.git"
},
"drupal": {
"type": "composer",
"url": "https://packages.drupal.org/8"
Expand All @@ -257,6 +275,7 @@
"cweagans/composer-patches": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"drupal/core-composer-scaffold": true,
"drupal/core-project-message": true,
"ergebnis/composer-normalize": true,
"mnsami/composer-custom-directory-installer": true,
"oomphinc/composer-installers-extender": true,
Expand Down Expand Up @@ -338,9 +357,6 @@
"3111456 - Unable to resolve path on node in other language than default": "https://www.drupal.org/files/issues/2024-07-11/decouple_router-3111456-resolve-language-issue-63--get-translation-re-rolled.patch",
"3176615 - RouteNotFoundException when a jsonapi individual route is not available": "https://gist.githubusercontent.com/vishalkhode1/aff30a9a82b895ce6071a0f71be2a5ba/raw/3176615-route-not-found-exception.patch"
},
"drupal/openapi_jsonapi": {
"Fixed the fatal error appearing due to changes in openapi module": "https://gist.githubusercontent.com/vishalkhode1/d904011f3a69aa71fa2c06219b077983/raw/fix-openapi-jsonapi-module.patch"
},
"mglaman/drupal-check": {
"Add custom rules to bypass check for buildForm": "https://github.com/mglaman/drupal-check/pull/286.patch"
}
Expand Down
Loading

0 comments on commit 3fb7173

Please sign in to comment.