Skip to content

Commit f94a689

Browse files
greg-1-andersonwebflo
authored andcommitted
Use g1a/composer-test-scenarios to test more php versions. (#84)
1 parent 2d6b255 commit f94a689

File tree

11 files changed

+3361
-308
lines changed

11 files changed

+3361
-308
lines changed

.scenarios.lock/install

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/bin/bash
2+
3+
SCENARIO=$1
4+
DEPENDENCIES=${2-install}
5+
6+
# Convert the aliases 'highest', 'lowest' and 'lock' to
7+
# the corresponding composer command to run.
8+
case $DEPENDENCIES in
9+
highest)
10+
DEPENDENCIES=update
11+
;;
12+
lowest)
13+
DEPENDENCIES='update --prefer-lowest'
14+
;;
15+
lock|default|"")
16+
DEPENDENCIES=install
17+
;;
18+
esac
19+
20+
original_name=scenarios
21+
recommended_name=".scenarios.lock"
22+
23+
base="$original_name"
24+
if [ -d "$recommended_name" ] ; then
25+
base="$recommended_name"
26+
fi
27+
28+
# If scenario is not specified, install the lockfile at
29+
# the root of the project.
30+
dir="$base/${SCENARIO}"
31+
if [ -z "$SCENARIO" ] || [ "$SCENARIO" == "default" ] ; then
32+
SCENARIO=default
33+
dir=.
34+
fi
35+
36+
# Test to make sure that the selected scenario exists.
37+
if [ ! -d "$dir" ] ; then
38+
echo "Requested scenario '${SCENARIO}' does not exist."
39+
exit 1
40+
fi
41+
42+
echo
43+
echo "::"
44+
echo ":: Switch to ${SCENARIO} scenario"
45+
echo "::"
46+
echo
47+
48+
set -ex
49+
50+
composer -n validate --working-dir=$dir --no-check-all --ansi
51+
composer -n --working-dir=$dir ${DEPENDENCIES} --prefer-dist --no-scripts
52+
composer -n --working-dir=$dir info

.scenarios.lock/phpunit4/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
vendor
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
{
2+
"name": "drupal-composer/drupal-scaffold",
3+
"description": "Composer Plugin for updating the Drupal scaffold files when using drupal/core",
4+
"type": "composer-plugin",
5+
"license": "GPL-2.0-or-later",
6+
"require": {
7+
"php": ">=5.4.5",
8+
"composer-plugin-api": "^1.0.0",
9+
"composer/semver": "^1.4"
10+
},
11+
"autoload": {
12+
"psr-4": {
13+
"DrupalComposer\\DrupalScaffold\\": "src/"
14+
}
15+
},
16+
"extra": {
17+
"class": "DrupalComposer\\DrupalScaffold\\Plugin",
18+
"branch-alias": {
19+
"dev-master": "2.0.x-dev"
20+
}
21+
},
22+
"scripts": {
23+
"cs": "phpcs --standard=PSR2 -n src",
24+
"cbf": "phpcbf --standard=PSR2 -n src",
25+
"unit": "phpunit --colors=always",
26+
"lint": [
27+
"find src -name '*.php' -print0 | xargs -0 -n1 php -l"
28+
],
29+
"test": [
30+
"@lint",
31+
"@unit"
32+
],
33+
"scenario": ".scenarios.lock/install",
34+
"post-update-cmd": [
35+
"create-scenario phpunit4 'phpunit/phpunit:^4.8.36' --platform-php '5.5.27'"
36+
]
37+
},
38+
"config": {
39+
"optimize-autoloader": true,
40+
"sort-packages": true,
41+
"platform": {
42+
"php": "5.5.27"
43+
},
44+
"vendor-dir": "../../vendor"
45+
},
46+
"require-dev": {
47+
"composer/composer": "dev-master",
48+
"g1a/composer-test-scenarios": "^2.1.0",
49+
"phpunit/phpunit": "^4.8.36",
50+
"squizlabs/php_codesniffer": "^2.8"
51+
},
52+
"minimum-stability": "stable"
53+
}

0 commit comments

Comments
 (0)