From c3623e8ad2d34083c1169746f5454ac4844fa08e Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Fri, 7 Oct 2022 01:36:38 +1100 Subject: [PATCH 1/6] Updated CI and composer to allow Drupal 10. --- .travis.yml | 13 +------------ composer.json | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3d7a8a37..0e695c8b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ language: php php: - - 7.3 - - 7.4 - 8.0 - 8.1 @@ -11,7 +9,6 @@ env: - PATH=$PATH:/home/travis/.config/composer/vendor/bin - TRAVIS_NODE_VERSION="4.0.0" matrix: - - DRUPAL_VERSION=7 - DRUPAL_VERSION=9 # Enable Travis containers. @@ -28,17 +25,13 @@ install: # @todo Re-enable behat drush endpoint testing. # @see https://github.com/jhedstrom/drupalextension/issues/458 - test ${DRUPAL_VERSION} -lt 8 || composer require --no-interaction --dev --no-update drupal/core-recommended:^${DRUPAL_VERSION} drupal/core-composer-scaffold:^${DRUPAL_VERSION} drush/drush:^10 - # Remove core/drush deps for Drupal 7. - - test ${DRUPAL_VERSION} -ge 8 || composer remove --dev drush/drush drupal/core-recommended drupal/core-composer-scaffold - composer install # For Drupal 8, change composer.json to require symfony 3.x as conflicting # versions between the separate drupal and drupalextension vendor folders # can create conflicts. # Install drush globally. - (test ${DRUPAL_VERSION} -lt 8 && composer global require drush/drush:~8.0 drupal/drupal-driver) || composer global require drush/drush:~10.0 - # Install the Behat Drush Endpoint for Drupal 7 tests. - - test ${DRUPAL_VERSION} -gt 7 || (git clone https://github.com/drush-ops/behat-drush-endpoint.git drush/behat-drush-endpoint && (cd drush/behat-drush-endpoint && composer install --no-dev && cd -)) - # Pin node version. + # Pin node version. # @see http://austinpray.com/ops/2015/09/20/change-travis-node-version.html - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION - npm install @@ -67,8 +60,6 @@ before_script: # @todo Re-enable behat drush endpoint testing. # @see https://github.com/jhedstrom/drupalextension/issues/458 # - test ${DRUPAL_VERSION} -eq 6 || test ${DRUPAL_VERSION} -eq 8 || (test ${DRUPAL_VERSION} -eq 7 && drush help behat) - # Only revert features on Drupal 7. - - test \! ${DRUPAL_VERSION} -eq 7 || drush --yes fr behat_test # Disable the page cache on Drupal 8. - test \! ${DRUPAL_VERSION} -ge 8 || drush --yes pmu page_cache # Test with big_pipe enabled for Drupal 8. @@ -84,8 +75,6 @@ script: - npm test - vendor/bin/behat -fprogress --strict - vendor/bin/behat -fprogress --profile=drupal${DRUPAL_VERSION} --strict - # Do not test the Drush profile unless Drupal 7 was installed. - - test ${DRUPAL_VERSION} -ne 7 || vendor/bin/behat -fprogress --profile=drush --strict after_failure: - cat ~/debug.txt diff --git a/composer.json b/composer.json index 81db5894..befaae80 100644 --- a/composer.json +++ b/composer.json @@ -20,23 +20,25 @@ } ], "prefer-stable": true, + "minimum-stability": "beta", "require": { "behat/behat": "~3.2", "behat/mink": "~1.5", "friends-of-behat/mink-extension": "^2", - "behat/mink-goutte-driver": "~1.0", + "behat/mink-goutte-driver": "~1|^2", "behat/mink-selenium2-driver": "~1.1", "drupal/drupal-driver": "^2.1.0", - "symfony/browser-kit": "^3.4|~4.4", - "symfony/dependency-injection": "~3.0|~4.4", - "symfony/translation": "^3.4|~4.4" + "symfony/browser-kit": "^3.4|~4.4|^6", + "symfony/dependency-injection": "~3.0|~4.4|^6", + "symfony/translation": "^3.4|~4.4|^6", + "cweagans/composer-patches": "^1.7" }, "require-dev": { - "composer/installers": "^1.2", + "composer/installers": "^1.2|^2", "drupal/coder": "^8.3", - "drupal/core-composer-scaffold": "^9.1", - "drupal/core-recommended": "^9.1", - "drush/drush": "^10.5", + "drupal/core-composer-scaffold": "^9.1|^10@beta", + "drupal/core-recommended": "^9.1|^10@beta", + "drush/drush": "^10.5|^11 ", "php-parallel-lint/php-parallel-lint": "^1.3", "phpspec/phpspec": "^4.0 || ^6.0 || ^7.0" }, @@ -77,7 +79,8 @@ "allow-plugins": { "composer/installers": true, "dealerdirect/phpcodesniffer-composer-installer": true, - "drupal/core-composer-scaffold": true + "drupal/core-composer-scaffold": true, + "cweagans/composer-patches": true } } } From 61e8bee45c9bb806cee450417c08c042511617f5 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Fri, 7 Oct 2022 03:04:03 +1100 Subject: [PATCH 2/6] Excluded files coming from Drupal install. --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 4dd0756a..0431cd1c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ behat.yml /package-lock.json /node_modules /.docksal +/.editorconfig +/.gitattributes From 379b623cadb8ddd92ac0813c40af8748b447d2f1 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Fri, 7 Oct 2022 03:04:28 +1100 Subject: [PATCH 3/6] Updated Gherkin Lint and fixed non-complient feature. --- features/api_background.feature | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/features/api_background.feature b/features/api_background.feature index 4d232987..f3ef2383 100644 --- a/features/api_background.feature +++ b/features/api_background.feature @@ -18,7 +18,7 @@ Feature: DrupalContext with background steps | Node one | | Node two | - Scenario Outline: + Scenario Outline: Testing login Given I am not logged in Examples: diff --git a/package.json b/package.json index f875eb3d..832be8e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "devDependencies": { - "gherkin-lint": "^2.12.0" + "gherkin-lint": "^3.4.2" }, "scripts": { "gherkin-lint": "gherkin-lint features", From d0d5484c8f2db1fb74c10e48ee245c33e6febf68 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Fri, 7 Oct 2022 03:04:47 +1100 Subject: [PATCH 4/6] Switched to using Drupal 10 compatible DrupalDriver. --- composer.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index befaae80..78a21af6 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "friends-of-behat/mink-extension": "^2", "behat/mink-goutte-driver": "~1|^2", "behat/mink-selenium2-driver": "~1.1", - "drupal/drupal-driver": "^2.1.0", + "drupal/drupal-driver": "dev-feature/drupal-10 as 2.1.0-dev", "symfony/browser-kit": "^3.4|~4.4|^6", "symfony/dependency-injection": "~3.0|~4.4|^6", "symfony/translation": "^3.4|~4.4|^6", @@ -60,6 +60,12 @@ "Drupal\\MinkExtension": "src/" } }, + "repositories": { + "drupal/drupal-driver": { + "type": "vcs", + "url": "https://github.com/drevops/DrupalDriver" + } + }, "extra": { "branch-alias": { "dev-master": "5.0.x-dev" From cb8b18759daa62aabd9cb5d97fb12e7b49e94edc Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Fri, 7 Oct 2022 03:26:45 +1100 Subject: [PATCH 5/6] Added patch. for mik extension. --- composer.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/composer.json b/composer.json index 78a21af6..6ef6f654 100644 --- a/composer.json +++ b/composer.json @@ -79,6 +79,11 @@ "locations": { "web-root": "drupal/" } + }, + "patches": { + "friends-of-behat/mink-extension": { + "setClient error from PR16": "https://github.com/FriendsOfBehat/MinkExtension/files/9480850/16.txt" + } } }, "config": { From 02d13f78d379c45359d31788d62de3da24aa1a95 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Wed, 26 Oct 2022 14:33:38 +1100 Subject: [PATCH 6/6] Removed patch for the link extension. --- composer.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 6ef6f654..4a09a95d 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "require": { "behat/behat": "~3.2", "behat/mink": "~1.5", - "friends-of-behat/mink-extension": "^2", + "friends-of-behat/mink-extension": "^2.7.2", "behat/mink-goutte-driver": "~1|^2", "behat/mink-selenium2-driver": "~1.1", "drupal/drupal-driver": "dev-feature/drupal-10 as 2.1.0-dev", @@ -79,11 +79,6 @@ "locations": { "web-root": "drupal/" } - }, - "patches": { - "friends-of-behat/mink-extension": { - "setClient error from PR16": "https://github.com/FriendsOfBehat/MinkExtension/files/9480850/16.txt" - } } }, "config": {