Skip to content

Commit

Permalink
Use g1a/composer-test-scenarios to test more php versions. (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-1-anderson authored and webflo committed Jun 14, 2018
1 parent 2d6b255 commit f94a689
Show file tree
Hide file tree
Showing 11 changed files with 3,361 additions and 308 deletions.
52 changes: 52 additions & 0 deletions .scenarios.lock/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/bin/bash

SCENARIO=$1
DEPENDENCIES=${2-install}

# Convert the aliases 'highest', 'lowest' and 'lock' to
# the corresponding composer command to run.
case $DEPENDENCIES in
highest)
DEPENDENCIES=update
;;
lowest)
DEPENDENCIES='update --prefer-lowest'
;;
lock|default|"")
DEPENDENCIES=install
;;
esac

original_name=scenarios
recommended_name=".scenarios.lock"

base="$original_name"
if [ -d "$recommended_name" ] ; then
base="$recommended_name"
fi

# If scenario is not specified, install the lockfile at
# the root of the project.
dir="$base/${SCENARIO}"
if [ -z "$SCENARIO" ] || [ "$SCENARIO" == "default" ] ; then
SCENARIO=default
dir=.
fi

# Test to make sure that the selected scenario exists.
if [ ! -d "$dir" ] ; then
echo "Requested scenario '${SCENARIO}' does not exist."
exit 1
fi

echo
echo "::"
echo ":: Switch to ${SCENARIO} scenario"
echo "::"
echo

set -ex

composer -n validate --working-dir=$dir --no-check-all --ansi
composer -n --working-dir=$dir ${DEPENDENCIES} --prefer-dist --no-scripts
composer -n --working-dir=$dir info
1 change: 1 addition & 0 deletions .scenarios.lock/phpunit4/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor
53 changes: 53 additions & 0 deletions .scenarios.lock/phpunit4/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"name": "drupal-composer/drupal-scaffold",
"description": "Composer Plugin for updating the Drupal scaffold files when using drupal/core",
"type": "composer-plugin",
"license": "GPL-2.0-or-later",
"require": {
"php": ">=5.4.5",
"composer-plugin-api": "^1.0.0",
"composer/semver": "^1.4"
},
"autoload": {
"psr-4": {
"DrupalComposer\\DrupalScaffold\\": "src/"
}
},
"extra": {
"class": "DrupalComposer\\DrupalScaffold\\Plugin",
"branch-alias": {
"dev-master": "2.0.x-dev"
}
},
"scripts": {
"cs": "phpcs --standard=PSR2 -n src",
"cbf": "phpcbf --standard=PSR2 -n src",
"unit": "phpunit --colors=always",
"lint": [
"find src -name '*.php' -print0 | xargs -0 -n1 php -l"
],
"test": [
"@lint",
"@unit"
],
"scenario": ".scenarios.lock/install",
"post-update-cmd": [
"create-scenario phpunit4 'phpunit/phpunit:^4.8.36' --platform-php '5.5.27'"
]
},
"config": {
"optimize-autoloader": true,
"sort-packages": true,
"platform": {
"php": "5.5.27"
},
"vendor-dir": "../../vendor"
},
"require-dev": {
"composer/composer": "dev-master",
"g1a/composer-test-scenarios": "^2.1.0",
"phpunit/phpunit": "^4.8.36",
"squizlabs/php_codesniffer": "^2.8"
},
"minimum-stability": "stable"
}

0 comments on commit f94a689

Please sign in to comment.