Skip to content
This repository was archived by the owner on Jan 10, 2022. It is now read-only.

Commit 678e19e

Browse files
committed
Merge branch 'release/2.0.2'
2 parents a7f0651 + 2585645 commit 678e19e

31 files changed

Lines changed: 1314 additions & 4205 deletions

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/build/
33

44
# Composer
5+
/composer.lock
56
/vendor/
67

78
# Eclipse
@@ -10,7 +11,11 @@
1011
/.settings
1112

1213
# Node.js
14+
/package-lock.json
1315
/node_modules/
1416

17+
# WordPress
18+
/wordpress/
19+
1520
# WordPress content
1621
/wp-content/

.scrutinizer.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
build:
2+
environment:
3+
variables:
4+
WP_TESTS_DB_NAME: 'wp_phpunit_tests'
5+
WP_TESTS_DB_USER: 'root'
6+
WP_TESTS_DB_PASS: ''
7+
WP_TESTS_DB_HOST: 'localhost'
8+
project_setup:
9+
before:
10+
- mysql -e "CREATE DATABASE wp_phpunit_tests"
11+
dependencies:
12+
override:
13+
- composer install --ignore-platform-reqs --no-interaction
14+
nodes:
15+
coverage:
16+
tests:
17+
override:
18+
- command: ./vendor/bin/phpunit
19+
coverage:
20+
file: build/logs/clover.xml
21+
format: clover
22+
23+
filter:
24+
excluded_paths:
25+
# Exclude the external `xmlseclibs.php` library.
26+
- 'includes/xmlseclibs/*'
27+
28+
checks:
29+
php:
30+
coding_standard:
31+
name: WordPress
32+
code_rating: true
33+
duplication: true
34+
35+
build_failure_conditions:
36+
- 'issues.label("bug").exists'
37+
38+
coding_style:
39+
php:
40+
indentation:
41+
general:
42+
use_tabs: true
43+
spaces:
44+
around_operators:
45+
unary_additive: true
46+
concatenation: true
47+
negation: true
48+
within:
49+
brackets: false
50+
array_initializer: true
51+
grouping: true
52+
function_call: true
53+
function_declaration: true
54+
if: true
55+
for: true
56+
while: true
57+
switch: true
58+
catch: true
59+
type_cast: false

.travis.yml

Lines changed: 67 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,46 @@ sudo: false
44

55
language: php
66

7-
php:
8-
- 5.4
9-
- 5.5
10-
- 5.6
11-
- 7.0
12-
- 7.1
13-
- 7.2
14-
- nightly
15-
- hhvm
7+
env:
8+
global:
9+
- COMPOSER_NO_INTERACTION=1
10+
- WP_VERSION=*
1611

17-
matrix:
12+
jobs:
1813
include:
14+
- php: 7.3
15+
env: WP_VERSION=^5.0 COVERAGE=1 PHPCS=1
16+
- php: 7.2
17+
env: WP_VERSION=^4.9
18+
- php: 7.2
19+
env: WP_VERSION=^4.8
20+
- php: 7.2
21+
env: WP_VERSION=^4.7
22+
- php: 7.3
23+
env: WP_MULTISITE=1
24+
- php: 7.3
25+
env: PHPSTAN=1
26+
- php: 7.3
27+
env: PHPMD=1
28+
- php: 7.3
29+
env: PSALM=1
30+
- php: 7.2
31+
- php: 7.1
32+
- php: 7.0
33+
- php: 5.6
34+
- php: 5.5
35+
- php: 5.4
1936
- php: 5.3
2037
dist: precise
2138
env: TRAVIS_DIST_PRECISE=1
22-
- php: 5.6
23-
env: WP_MULTISITE=1
24-
- php: 5.6
25-
env: WP_VERSION=4.8
26-
- php: 5.6
27-
env: WP_VERSION=4.7 COVERAGE=1 GRUNT=1
28-
fast_finish: true
39+
- php: nightly
40+
- php: hhvm
2941
allow_failures:
3042
- php: hhvm
3143
- php: nightly
44+
- env: PHPMD=1
45+
- env: PHPSTAN=1
46+
- env: PSALM=1
3247

3348
cache:
3449
directories:
@@ -39,6 +54,23 @@ cache:
3954
before_install:
4055
# Install latest version of Node.js (https://github.com/creationix/nvm).
4156
- if [ "${TRAVIS_DIST_PRECISE}" == "1" ]; then nvm install node; fi
57+
# Create database for PHPUnit tests.
58+
- mysql -e 'CREATE DATABASE wp_phpunit_tests;'
59+
# Remove Xdebug for a huge performance increase:
60+
- |
61+
if [[ "$COVERAGE" != "1" && -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]]; then
62+
phpenv config-rm xdebug.ini
63+
fi
64+
# Raise PHP memory limit to 2048MB
65+
- echo 'memory_limit = 2048M' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
66+
# Validate composer.json file.
67+
- composer validate --strict
68+
# Add Composer global vendor/bin to path.
69+
- export PATH="$HOME/.composer/vendor/bin:$PATH"
70+
# PHPStan
71+
- if [ "$PHPSTAN" == "1" ]; then composer global require phpstan/phpstan; fi
72+
# Psalm
73+
- if [ "$PSALM" == "1" ]; then composer global require vimeo/psalm; fi
4274

4375
install:
4476
# Install Grunt command line interface (https://github.com/gruntjs/grunt-cli).
@@ -49,16 +81,25 @@ install:
4981
- composer self-update
5082
# Install Composer packages.
5183
- composer install
52-
53-
before_script:
54-
- wget https://raw.githubusercontent.com/wp-cli/sample-plugin/master/bin/install-wp-tests.sh
55-
- bash install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
84+
# Test on specific WordPress version.
85+
- composer require --dev --update-with-dependencies roots/wordpress:${WP_VERSION} wp-phpunit/wp-phpunit:${WP_VERSION}
86+
# List available packages.
87+
- composer show
5688

5789
script:
58-
- if [[ -z "$GRUNT" ]]; then grunt phpunit; fi
59-
- if [[ -z "$GRUNT" ]]; then grunt phplint; fi
60-
- if [[ "$GRUNT" == "1" ]]; then grunt; fi
90+
# PHPLint
91+
- composer run-script phplint
92+
# PHPUnit
93+
- composer run-script phpunit
94+
# PHP_CodeSniffer
95+
- if [ "$PHPCS" == "1" ]; then composer run-script phpcs; fi
96+
# PHP Mess Detector
97+
- if [ "$PHPMD" == "1" ]; then composer run-script phpmd; fi
98+
# PHPStan
99+
- if [ "$PHPSTAN" == "1" ]; then phpstan analyze; fi
100+
# Psalm
101+
- if [ "$PSALM" == "1" ]; then psalm; fi
61102

62103
after_success:
63-
- if [ $COVERAGE == "1" ]; then php vendor/bin/coveralls -v; fi
64-
- if [ $COVERAGE == "1" ]; then bash <(curl -s https://codecov.io/bash); fi
104+
- if [ "$COVERAGE" == "1" ]; then composer run-script coveralls; fi
105+
- if [ "$COVERAGE" == "1" ]; then bash <(curl -s https://codecov.io/bash); fi

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ This projects adheres to [Semantic Versioning](http://semver.org/) and [Keep a C
77
## [Unreleased][unreleased]
88
-
99

10+
## [2.0.2] - 2019-03-29
11+
- Added support for additional payment data like customer, adresses, payment lines, etc.
12+
- Added gateway for AfterPay, Bancontact, Bank Transfer, Credit Card, Focum, Giropay, Maestro, PayPal and SOFORT.
13+
1014
## [2.0.1] - 2018-12-12
1115
- Update item methods in payment data.
1216

@@ -36,7 +40,8 @@ This projects adheres to [Semantic Versioning](http://semver.org/) and [Keep a C
3640
### Added
3741
- First release.
3842

39-
[unreleased]: https://github.com/wp-pay-extensions/wp-e-commerce/compare/2.0.1...HEAD
43+
[unreleased]: https://github.com/wp-pay-extensions/wp-e-commerce/compare/2.0.2...HEAD
44+
[2.0.2]: https://github.com/wp-pay-extensions/wp-e-commerce/compare/2.0.1...2.0.2
4045
[2.0.1]: https://github.com/wp-pay-extensions/wp-e-commerce/compare/2.0.0...2.0.1
4146
[2.0.0]: https://github.com/wp-pay-extensions/wp-e-commerce/compare/1.0.5...2.0.0
4247
[1.0.5]: https://github.com/wp-pay-extensions/wp-e-commerce/compare/1.0.4...1.0.5

Gruntfile.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ module.exports = function( grunt ) {
1818
// PHP Code Sniffer
1919
phpcs: {
2020
application: {
21-
src: [
22-
'**/*.php',
23-
'!node_modules/**',
24-
'!vendor/**',
25-
'!wp-content/**'
21+
src: [
22+
'**/*.php',
23+
'!node_modules/**',
24+
'!vendor/**',
25+
'!wordpress/**',
26+
'!wp-content/**'
2627
]
2728
},
2829
options: {
@@ -60,5 +61,5 @@ module.exports = function( grunt ) {
6061
} );
6162

6263
// Default task(s).
63-
grunt.registerTask( 'default', [ 'jshint', 'phplint', 'phpmd', 'phpcs' ] );
64+
grunt.registerTask( 'default', [ 'jshint', 'phplint', 'phpmd', 'phpcs', 'phpunit' ] );
6465
};

composer.json

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,50 @@
3535
},
3636
"require": {
3737
"php": "^5.3",
38-
"wp-pay/core": "^2.0"
38+
"wp-pay/core": "^2.1"
3939
},
40+
"repositories": [
41+
{
42+
"type": "package",
43+
"package": {
44+
"name": "wp-e-commerce/WP-e-Commerce",
45+
"version": "3.14.0",
46+
"dist": {
47+
"url": "https://github.com/wp-e-commerce/WP-e-Commerce/archive/3.14.0.zip",
48+
"type": "zip"
49+
},
50+
"source": {
51+
"url": "https://github.com/wp-e-commerce/WP-e-Commerce",
52+
"type": "github",
53+
"reference": "tags/3.14.0"
54+
},
55+
"autoload": {
56+
"classmap": [
57+
"."
58+
]
59+
}
60+
}
61+
}
62+
],
4063
"require-dev": {
41-
"php-coveralls/php-coveralls": "^1.0",
64+
"wp-e-commerce/WP-e-Commerce": "^3.14",
65+
"dealerdirect/phpcodesniffer-composer-installer": "^0.5",
66+
"php-coveralls/php-coveralls": "^1.1",
67+
"phpcompatibility/php-compatibility": "^9.1",
68+
"phpcompatibility/phpcompatibility-wp": "^2.0",
4269
"phpmd/phpmd": "^2.4",
4370
"phpunit/phpunit": "^4.8",
71+
"roots/wordpress": "^5.0",
4472
"squizlabs/php_codesniffer": "^2.9",
45-
"wimg/php-compatibility": "^8.1",
46-
"wp-coding-standards/wpcs": "^0.14.1"
73+
"wp-coding-standards/wpcs": "^1.2",
74+
"wp-phpunit/wp-phpunit": "^5.0"
75+
},
76+
"scripts": {
77+
"coveralls": "vendor/bin/coveralls -v",
78+
"phpcbf": "vendor/bin/phpcbf",
79+
"phpcs": "vendor/bin/phpcs -s -v",
80+
"phplint": "find src tests -name '*.php' | xargs -n 1 -P 4 php -l",
81+
"phpmd": "vendor/bin/phpmd src,tests text phpmd.ruleset.xml --suffixes php",
82+
"phpunit": "vendor/bin/phpunit"
4783
}
4884
}

0 commit comments

Comments
 (0)