Skip to content

Commit cee5e37

Browse files
authored
Merge pull request #116 from wp-cli/adapt-for-v2
Adapt package for framework v2
2 parents 18f1036 + b1d0b40 commit cee5e37

File tree

14 files changed

+73
-3496
lines changed

14 files changed

+73
-3496
lines changed

.travis.yml

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ sudo: false
22
dist: trusty
33

44
language: php
5+
php: 7.2
56

67
notifications:
78
email:
@@ -21,24 +22,6 @@ env:
2122
- PATH="$TRAVIS_BUILD_DIR/vendor/bin:$PATH"
2223
- WP_CLI_BIN_DIR="$TRAVIS_BUILD_DIR/vendor/bin"
2324

24-
matrix:
25-
include:
26-
- php: 7.2
27-
env: WP_VERSION=latest
28-
- php: 7.1
29-
env: WP_VERSION=latest
30-
- php: 7.0
31-
env: WP_VERSION=latest
32-
- php: 5.6
33-
env: WP_VERSION=latest
34-
- php: 5.6
35-
env: WP_VERSION=3.7.11
36-
- php: 5.6
37-
env: WP_VERSION=trunk
38-
- php: 5.3
39-
dist: precise
40-
env: WP_VERSION=latest
41-
4225
before_install:
4326
- |
4427
# Remove Xdebug for a huge performance increase:
@@ -50,14 +33,42 @@ before_install:
5033
- |
5134
# Raise PHP memory limit to 2048MB
5235
echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
36+
- composer validate
5337

5438
install:
55-
- composer require wp-cli/wp-cli:dev-master
5639
- composer install
57-
- bash bin/install-package-tests.sh
58-
59-
before_script:
60-
- composer validate
40+
- composer prepare-tests
6141

6242
script:
63-
- bash bin/test.sh
43+
- composer phpunit
44+
- composer behat
45+
46+
jobs:
47+
include:
48+
- stage: sniff
49+
script:
50+
- composer lint
51+
- composer phpcs
52+
env: BUILD=sniff
53+
- stage: test
54+
php: 7.2
55+
env: WP_VERSION=latest
56+
- stage: test
57+
php: 7.1
58+
env: WP_VERSION=latest
59+
- stage: test
60+
php: 7.0
61+
env: WP_VERSION=latest
62+
- stage: test
63+
php: 5.6
64+
env: WP_VERSION=latest
65+
- stage: test
66+
php: 5.6
67+
env: WP_VERSION=3.7.11
68+
- stage: test
69+
php: 5.6
70+
env: WP_VERSION=trunk
71+
- stage: test
72+
php: 5.4
73+
dist: precise
74+
env: WP_VERSION=latest

bin/install-package-tests.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

bin/test.sh

Lines changed: 0 additions & 17 deletions
This file was deleted.

composer.json

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
22
"name": "wp-cli/extension-command",
3-
"description": "Manages plugins and themes, including installs, activations, and updates.",
43
"type": "wp-cli-package",
4+
"description": "Manages plugins and themes, including installs, activations, and updates.",
55
"homepage": "https://github.com/wp-cli/extension-command",
6-
"support": {
7-
"issues": "https://github.com/wp-cli/extension-command/issues"
8-
},
96
"license": "MIT",
107
"authors": [
118
{
@@ -14,24 +11,24 @@
1411
"homepage": "https://runcommand.io"
1512
}
1613
],
17-
"minimum-stability": "dev",
18-
"prefer-stable": true,
19-
"autoload": {
20-
"psr-4": {
21-
"": "src/"
22-
},
23-
"files": [ "extension-command.php" ]
14+
"require": {
15+
"composer/semver": "^1.4",
16+
"wp-cli/wp-cli": "^2"
2417
},
25-
"require": {},
2618
"require-dev": {
27-
"behat/behat": "~2.5",
28-
"wp-cli/wp-cli": "*"
19+
"wp-cli/entity-command": "^1.3",
20+
"wp-cli/scaffold-command": "^1.2",
21+
"wp-cli/wp-cli-tests": "^0"
22+
},
23+
"config": {
24+
"sort-packages": true,
25+
"process-timeout": 7200
2926
},
3027
"extra": {
3128
"branch-alias": {
3229
"dev-master": "1.x-dev"
3330
},
34-
"bundled": true,
31+
"bundled": true,
3532
"commands": [
3633
"plugin",
3734
"plugin activate",
@@ -66,5 +63,31 @@
6663
"theme update",
6764
"theme mod list"
6865
]
66+
},
67+
"autoload": {
68+
"psr-4": {
69+
"": "src/"
70+
},
71+
"files": [
72+
"extension-command.php"
73+
]
74+
},
75+
"minimum-stability": "dev",
76+
"prefer-stable": true,
77+
"scripts": {
78+
"behat": "run-behat-tests",
79+
"lint": "run-linter-tests",
80+
"phpcs": "run-phpcs-tests",
81+
"phpunit": "run-php-unit-tests",
82+
"prepare-tests": "install-package-tests",
83+
"test": [
84+
"@lint",
85+
"@phpcs",
86+
"@phpunit",
87+
"@behat"
88+
]
89+
},
90+
"support": {
91+
"issues": "https://github.com/wp-cli/extension-command/issues"
6992
}
7093
}

0 commit comments

Comments
 (0)