Skip to content
This repository has been archived by the owner on Aug 5, 2021. It is now read-only.

Commit

Permalink
Merge branch 'release/3.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Aug 5, 2021
2 parents 4eb9cf3 + e65dce9 commit d1e68da
Show file tree
Hide file tree
Showing 12 changed files with 329 additions and 255 deletions.
35 changes: 23 additions & 12 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
build:
nodes:
analysis:
tests:
override:
- php-scrutinizer-run

coverage:
tests:
override:
- command: ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml
coverage:
file: build/logs/clover.xml
format: clover

environment:
php: 7.3.0
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"
WP_TESTS_DB_HOST: '127.0.0.1'

services:
mysql: 5.7

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

project_setup:
before:
- mysql -e "CREATE DATABASE wp_phpunit_tests"

filter:
excluded_paths:
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ This projects adheres to [Semantic Versioning](http://semver.org/) and [Keep a C
## [Unreleased][unreleased]
-

## [3.0.0] - 2021-08-05
- Updated to `pronamic/wp-pay-core` version `3.0.0`.
- Updated to `pronamic/wp-money` version `2.0.0`.
- Switched to `pronamic/wp-coding-standards`.

## [2.1.1] - 2021-04-26
- Happy 2021.

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

[unreleased]: https://github.com/wp-pay-gateways/ing-kassa-compleet/compare/2.1.1...HEAD
[unreleased]: https://github.com/wp-pay-gateways/ing-kassa-compleet/compare/3.0.0...HEAD
[3.0.0]: https://github.com/wp-pay-gateways/ing-kassa-compleet/compare/2.1.1...3.0.0
[2.1.1]: https://github.com/wp-pay-gateways/ing-kassa-compleet/compare/2.1.0...2.1.1
[2.1.0]: https://github.com/wp-pay-gateways/ing-kassa-compleet/compare/2.0.3...2.1.0
[2.0.3]: https://github.com/wp-pay-gateways/ing-kassa-compleet/compare/2.0.2...2.0.3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# WordPress Pay Gateway: ING Kassa Compleet
# [DEPRECATED] WordPress Pay Gateway: ING Kassa Compleet

**ING Kassa Compleet driver for the WordPress payment processing library.**

Expand Down
14 changes: 5 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,22 @@
},
"require": {
"php": ">=5.6.20",
"wp-pay/core": "^2.6"
"wp-pay/core": "^3.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
"overtrue/phplint": "^1.2",
"php-coveralls/php-coveralls": "^2.4",
"phpcompatibility/php-compatibility": "^9.2",
"phpcompatibility/phpcompatibility-wp": "^2.0",
"phpmd/phpmd": "^2.7",
"phpunit/phpunit": "^5.7 || ^6.0",
"roots/wordpress": "^5.6",
"squizlabs/php_codesniffer": "^3.4",
"wp-coding-standards/wpcs": "^2.3",
"wp-phpunit/wp-phpunit": "^5.6"
"pronamic/wp-coding-standards": "^1.0",
"roots/wordpress": "^5.8",
"wp-phpunit/wp-phpunit": "^5.8"
},
"scripts": {
"coveralls": "vendor/bin/php-coveralls -v",
"phpcbf": "vendor/bin/phpcbf",
"phpcs": "vendor/bin/phpcs -s -v",
"phpcs": "XDEBUG_MODE=off vendor/bin/phpcs -s -v",
"phplint": "vendor/bin/phplint",
"phpmd": "vendor/bin/phpmd src,tests text phpmd.ruleset.xml --suffixes php",
"phpstan": "vendor/bin/phpstan analyse",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ing-kassa-compleet",
"version": "2.1.1",
"version": "3.0.0",
"description": "ING Kassa Compleet driver for the WordPress payment processing library.",
"repository": {
"type": "git",
Expand Down
23 changes: 3 additions & 20 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
@@ -1,35 +1,18 @@
<?xml version="1.0"?>

<ruleset name="WordPress Pay ING Kassa Compleet rules">
<config name="minimum_supported_wp_version" value="4.7" />

<config name="testVersion" value="5.6-" />

<file>.</file>

<arg name="colors"/>
<arg name="extensions" value="php" />
<arg value="sp" />

<exclude-pattern>node_modules/*</exclude-pattern>
<exclude-pattern>tests/bootstrap.php</exclude-pattern>
<exclude-pattern>tests/wp-config.php</exclude-pattern>
<exclude-pattern>vendor/*</exclude-pattern>
<exclude-pattern>wordpress/*</exclude-pattern>
<exclude-pattern type="relative">^wp-content/*</exclude-pattern>

<rule ref="PHPCompatibilityWP" />

<rule ref="WordPress">
<exclude name="Generic.Files.LowercasedFilename.NotFound" />

<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />

<rule ref="PronamicWP">
<exclude name="WordPress.WP.AlternativeFunctions.file_get_contents_file_get_contents" />
<exclude name="WordPress.WP.AlternativeFunctions.file_system_read_file_get_contents" />

<exclude name="WordPress.VIP.RestrictedFunctions.file_get_contents_file_get_contents" />

<exclude name="WordPressVIPMinimum.Performance.FetchingRemoteData.FileGetContentsRemoteFile" />
</rule>

<rule ref="WordPress.DB.SlowDBQuery.slow_db_query_meta_key">
Expand Down
4 changes: 0 additions & 4 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@
</whitelist>
</filter>

<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>

<php>
<env name="WP_PHPUNIT__TESTS_CONFIG" value="tests/wp-config.php"/>
</php>
Expand Down
2 changes: 1 addition & 1 deletion src/Gateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function start( Payment $payment ) {
$request = new OrderRequest();

$request->currency = $payment->get_total_amount()->get_currency()->get_alphabetic_code();
$request->amount = $payment->get_total_amount()->get_cents();
$request->amount = $payment->get_total_amount()->get_minor_units()->format( 0, '', '' );
$request->merchant_order_id = $payment->get_order_id();
$request->description = $payment->get_description();
$request->return_url = $payment->get_return_url();
Expand Down
1 change: 1 addition & 0 deletions src/Integration.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function __construct( $args = array() ) {
$args = wp_parse_args(
$args,
array(
'deprecated' => true,
'id' => 'ing-kassa-compleet',
'name' => 'ING - Kassa Compleet',
'provider' => 'ing',
Expand Down
2 changes: 1 addition & 1 deletion src/OrderRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class OrderRequest {
/**
* Amount in cents
*
* @var float
* @var string
*/
public $amount;

Expand Down
64 changes: 34 additions & 30 deletions vendor-bin/phpstan/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d1e68da

Please sign in to comment.