diff --git a/travis_setup_drupal.sh b/travis_setup_drupal.sh index d58bbf3..dff051b 100755 --- a/travis_setup_drupal.sh +++ b/travis_setup_drupal.sh @@ -35,9 +35,19 @@ fi composer require "drupal/core-dev:$DRUPAL_VERSION" DRUPAL_MAJOR=$(echo "$DRUPAL_VERSION" | cut -d. -f1) if [ $DRUPAL_MAJOR -ge 9 ]; then - composer require phpspec/prophecy-phpunit:^2 + # XXX: 9.4.x-dev installs phpunit 8... but then we expect to have to install + # the phpspec/prophecy-phpunit:^2 thing, which only works with phpunit 9. + composer require -W phpunit/phpunit:^9 + composer require phpspec/prophecy-phpunit:^2 drush/drush +elif [ $DRUPAL_MAJOR -eq 8 ]; then + composer require drush/drush:^10 +elif [ $DRUPAL_MAJOR -eq 7 ]; then + composer require drush/drush:^8 +else + echo "Unmapped major version of Drupal: $DRUPAL_MAJOR" + exit 1 fi -composer require drush/drush=~10 + echo "Setup Drush" sudo ln -s /opt/drupal/vendor/bin/drush /usr/bin/drush phpenv rehash