Skip to content

Commit

Permalink
Merge branch 'release/2.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Mar 28, 2019
2 parents ef4611a + 4a7f634 commit 12f6000
Show file tree
Hide file tree
Showing 63 changed files with 720 additions and 4,271 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/build/

# Composer
/composer.lock
/vendor/

# Eclipse
Expand All @@ -10,4 +11,8 @@
/.settings

# Node.js
/package-lock.json
/node_modules/

# WordPress
/wordpress/
59 changes: 59 additions & 0 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
build:
environment:
variables:
WP_TESTS_DB_NAME: 'wp_phpunit_tests'
WP_TESTS_DB_USER: 'root'
WP_TESTS_DB_PASS: ''
WP_TESTS_DB_HOST: 'localhost'
project_setup:
before:
- mysql -e "CREATE DATABASE wp_phpunit_tests"
dependencies:
override:
- composer install --ignore-platform-reqs --no-interaction
nodes:
coverage:
tests:
override:
- command: ./vendor/bin/phpunit
coverage:
file: build/logs/clover.xml
format: clover

filter:
excluded_paths:
# Exclude the external `xmlseclibs.php` library.
- 'includes/xmlseclibs/*'

checks:
php:
coding_standard:
name: WordPress
code_rating: true
duplication: true

build_failure_conditions:
- 'issues.label("bug").exists'

coding_style:
php:
indentation:
general:
use_tabs: true
spaces:
around_operators:
unary_additive: true
concatenation: true
negation: true
within:
brackets: false
array_initializer: true
grouping: true
function_call: true
function_declaration: true
if: true
for: true
while: true
switch: true
catch: true
type_cast: false
93 changes: 67 additions & 26 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,46 @@ sudo: false

language: php

php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- nightly
- hhvm
env:
global:
- COMPOSER_NO_INTERACTION=1
- WP_VERSION=*

matrix:
jobs:
include:
- php: 7.3
env: WP_VERSION=^5.0 COVERAGE=1 PHPCS=1
- php: 7.2
env: WP_VERSION=^4.9
- php: 7.2
env: WP_VERSION=^4.8
- php: 7.2
env: WP_VERSION=^4.7
- php: 7.3
env: WP_MULTISITE=1
- php: 7.3
env: PHPSTAN=1
- php: 7.3
env: PHPMD=1
- php: 7.3
env: PSALM=1
- php: 7.2
- php: 7.1
- php: 7.0
- php: 5.6
- php: 5.5
- php: 5.4
- php: 5.3
dist: precise
env: TRAVIS_DIST_PRECISE=1
- php: 5.6
env: WP_MULTISITE=1
- php: 5.6
env: WP_VERSION=4.8
- php: 5.6
env: WP_VERSION=4.7 COVERAGE=1 GRUNT=1
fast_finish: true
- php: nightly
- php: hhvm
allow_failures:
- php: hhvm
- php: nightly
- env: PHPMD=1
- env: PHPSTAN=1
- env: PSALM=1

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

install:
# Install Grunt command line interface (https://github.com/gruntjs/grunt-cli).
Expand All @@ -49,16 +81,25 @@ install:
- composer self-update
# Install Composer packages.
- composer install

before_script:
- wget https://raw.githubusercontent.com/wp-cli/sample-plugin/master/bin/install-wp-tests.sh
- bash install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
# Test on specific WordPress version.
- composer require --dev --update-with-dependencies roots/wordpress:${WP_VERSION} wp-phpunit/wp-phpunit:${WP_VERSION}
# List available packages.
- composer show

script:
- if [[ -z "$GRUNT" ]]; then grunt phpunit; fi
- if [[ -z "$GRUNT" ]]; then grunt phplint; fi
- if [[ "$GRUNT" == "1" ]]; then grunt; fi
# PHPLint
- composer run-script phplint
# PHPUnit
- composer run-script phpunit
# PHP_CodeSniffer
- if [ "$PHPCS" == "1" ]; then composer run-script phpcs; fi
# PHP Mess Detector
- if [ "$PHPMD" == "1" ]; then composer run-script phpmd; fi
# PHPStan
- if [ "$PHPSTAN" == "1" ]; then phpstan analyze; fi
# Psalm
- if [ "$PSALM" == "1" ]; then psalm; fi

after_success:
- if [ $COVERAGE == "1" ]; then php vendor/bin/coveralls -v; fi
- if [ $COVERAGE == "1" ]; then bash <(curl -s https://codecov.io/bash); fi
- if [ "$COVERAGE" == "1" ]; then composer run-script coveralls; fi
- if [ "$COVERAGE" == "1" ]; then bash <(curl -s https://codecov.io/bash); fi
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ This projects adheres to [Semantic Versioning](http://semver.org/) and [Keep a C
## [Unreleased][unreleased]
-

## [2.0.2] - 2019-03-28
- Moved custom payment redirect from plugin to gateway.
- Make use of payment `get_pay_redirect_url()` method.
- Added initial support for Ogone alias creation.
- Added HTML/CSS classes to `TP` parameter settings field.

## [2.0.1] - 2018-12-12
- Updated deprecated function calls.

Expand Down Expand Up @@ -87,7 +93,8 @@ This projects adheres to [Semantic Versioning](http://semver.org/) and [Keep a C
## 1.0.0 - 2015-01-19
- First release.

[unreleased]: https://github.com/wp-pay-gateways/ogone/compare/2.0.1...HEAD
[unreleased]: https://github.com/wp-pay-gateways/ogone/compare/2.0.2...HEAD
[2.0.2]: https://github.com/wp-pay-gateways/ogone/compare/2.0.1...2.0.2
[2.0.1]: https://github.com/wp-pay-gateways/ogone/compare/2.0.0...2.0.1
[2.0.0]: https://github.com/wp-pay-gateways/ogone/compare/1.3.4...2.0.0
[1.3.4]: https://github.com/wp-pay-gateways/ogone/compare/1.3.3...1.3.4
Expand Down
9 changes: 6 additions & 3 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,14 @@ module.exports = function( grunt ) {
src: [
'**/*.php',
'!node_modules/**',
'!vendor/**'
'!vendor/**',
'!wordpress/**',
'!wp-content/**'
]
},
options: {
bin: 'vendor/bin/phpcs',
standard: 'phpcs.ruleset.xml',
standard: 'phpcs.xml.dist',
showSniffCodes: true
}
},
Expand All @@ -32,7 +34,8 @@ module.exports = function( grunt ) {
all: [
'**/*.php',
'!node_modules/**',
'!vendor/**'
'!vendor/**',
'!wordpress/**',
]
},

Expand Down
29 changes: 18 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,28 @@
}
},
"require": {
"ext-simplexml": "*",
"php": "^5.3",
"wp-pay/core": "^2.0",
"wp-pay-gateways/common": "^2.0"
"wp-pay/core": "^2.1"
},
"require-dev": {
"phpmd/phpmd": "^2.2.3",
"phpunit/phpunit": "^4.5",
"satooshi/php-coveralls": "^0.7.1",
"squizlabs/php_codesniffer": "^2.7",
"wp-coding-standards/wpcs": "^0.10.0",
"wp-cli/wp-cli": "^0.21.1"
"dealerdirect/phpcodesniffer-composer-installer": "^0.5",
"php-coveralls/php-coveralls": "^1.1",
"phpcompatibility/php-compatibility": "^9.1",
"phpcompatibility/phpcompatibility-wp": "^2.0",
"phpmd/phpmd": "^2.4",
"phpunit/phpunit": "^4.8",
"roots/wordpress": "^5.0",
"squizlabs/php_codesniffer": "^2.9",
"wp-coding-standards/wpcs": "^1.2",
"wp-phpunit/wp-phpunit": "^5.0"
},
"scripts": {
"post-autoload-dump": [
"if [ -d vendor/wp-coding-standards/wpcs ]; then vendor/bin/phpcs --config-set installed_paths vendor/wp-coding-standards/wpcs; fi"
]
"coveralls": "vendor/bin/coveralls -v",
"phpcbf": "vendor/bin/phpcbf",
"phpcs": "vendor/bin/phpcs -s -v",
"phplint": "find src tests -name '*.php' | xargs -n 1 -P 4 php -l",
"phpmd": "vendor/bin/phpmd src,tests text phpmd.ruleset.xml --suffixes php",
"phpunit": "vendor/bin/phpunit"
}
}
Loading

0 comments on commit 12f6000

Please sign in to comment.