Skip to content

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 79dae9b + 6e4102a commit 8bacb63
Show file tree
Hide file tree
Showing 86 changed files with 1,932 additions and 1,240 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ trim_trailing_whitespace = true
[*.txt]
trim_trailing_whitespace = false

[*.{md,json,yml}]
[*.{md,json,yaml,yml}]
trim_trailing_whitespace = false
indent_style = space
indent_size = 2
122 changes: 86 additions & 36 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,22 @@ on: [ push, pull_request ]
env:
COMPOSER_NO_INTERACTION: 1
WP_TESTS_DB_PASS: password
php-version: '7.4'
wp-version: '*'
phpunit-version: '^6.0'

jobs:
coding-standards:
name: Coding Standards (PHP ${{ matrix.php-version }})
phpcs:
name: PHP Coding Standards

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-version:
- 7.4

steps:
- uses: actions/checkout@v2

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
php-version: ${{ env.php-version }}
extensions: bcmath, intl, mbstring, mysql
ini-values: memory_limit=2048M
tools: composer, phpcs
Expand Down Expand Up @@ -54,32 +50,64 @@ jobs:
- name: List Composer packages
run: composer show

- name: PHPLint
run: composer run-script phplint

- name: PHP Code Sniffer
run: composer run-script phpcs

phpmd:
name: PHP Mess Detector

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.php-version }}
extensions: bcmath, intl, mbstring, mysql
ini-values: memory_limit=2048M
tools: composer
coverage: none

- name: Composer validation
run: composer validate --strict

# https://github.com/actions/cache/blob/master/examples.md#php---composer
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Require WordPress
run: composer require --dev --no-update --no-progress --no-suggest roots/wordpress:${{ env.wp-version }} wp-phpunit/wp-phpunit:${{ env.wp-version }}

- name: Install Composer dependencies
run: composer update --no-progress --no-suggest

- name: List Composer packages
run: composer show

- name: PHP Mess Detector
continue-on-error: true
run: composer run-script phpmd

static-code-analysis:
name: Static Code Analysis (PHP ${{ matrix.php-version }})
phpstan:
name: PHPStan

runs-on: ubuntu-latest

strategy:
matrix:
php-version:
- 7.4

steps:
- uses: actions/checkout@v2

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
php-version: ${{ env.php-version }}
extensions: bcmath, intl, mbstring, mysql
ini-values: memory_limit=2048M
tools: composer
Expand All @@ -100,8 +128,11 @@ jobs:
- name: Install Composer dependencies
run: composer update --no-progress --no-suggest

- name: PHPStan static code analysis
run: composer bin phpstan install && composer run-script phpstan
- name: Install PHPStan
run: composer bin phpstan install

- name: PHPStan
run: composer run-script phpstan

tests:
name: Tests — PHP ${{ matrix.php-version }} ${{ matrix.name }}
Expand Down Expand Up @@ -215,16 +246,10 @@ jobs:
run: composer run-script phpunit

code-coverage:
name: Code Coverage (PHP ${{ matrix.php-version }})
name: Code Coverage

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-version:
- 7.4

services:
mysql:
image: mysql:5.7
Expand All @@ -241,7 +266,7 @@ jobs:

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
php-version: ${{ env.php-version }}
extensions: bcmath, intl, mbstring, mysql
ini-values: memory_limit=2048M
tools: composer
Expand Down Expand Up @@ -277,17 +302,19 @@ jobs:
- name: PHPUnit test suite
env:
WP_TESTS_DB_HOST: 127.0.0.1:${{ job.services.mysql.ports['3306'] }}
run: composer run-script phpunit
run: composer run-script coverage

- name: Coveralls code coverage
- name: Publish coverage
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

run: |
composer run-script coveralls
bash <(curl -s https://codecov.io/bash)
es-sass-linting:
name: Scripts and Styles
es-lint:
name: Scripts

runs-on: ubuntu-latest

Expand All @@ -312,5 +339,28 @@ jobs:
- name: ESLint
run: npm run-script eslint

- name: Sass Lint
run: npm run-script sass-lint
sass-lint:
name: Styles

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

# https://github.com/actions/cache/blob/master/examples.md#macos-and-ubuntu
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- uses: actions/setup-node@v1
with:
node-version: '12'

- name: Install Node packages
run: npm install

- name: Sass Lint
run: npm run-script sass-lint
38 changes: 21 additions & 17 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,37 @@
build:
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"
dependencies:
override:
- composer install --no-interaction
nodes:
analysis:
tests:
override:
-
command: phpcs-run
use_website_config: false
- php-scrutinizer-run

coverage:
tests:
override:
- command: vendor/bin/phpunit
- 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: '127.0.0.1'

services:
mysql: 5.7

dependencies:
override:
- composer install --ignore-platform-reqs --no-interaction

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

filter:
excluded_paths:
# Exclude the external `xmlseclibs.php` library.
Expand Down
22 changes: 21 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,25 @@ This projects adheres to [Semantic Versioning](http://semver.org/) and [Keep a C
## [Unreleased][unreleased]
-

## [3.0.0] - 2021-08-05
### Changed
- Updated to `pronamic/wp-money` version ` 2.0.0`.
- No longer require taxed money in payments and subscriptions.
- Gateway in WordPress admin dashboard is now clickable.
- Updated subscription action URLs to include trailing slash.
- Made transaction ID searchable by inclusion in payment JSON post content.
- Updated hooks documentation.

### Added
- Added support for SprayPay payment method.

### Fixed
- Fixed payment form amount input styling with WordPress default theme.
- Fixed deprecated `block_categories` filter warning with WordPress 5.8.

### Removed
- Removed [Shortcake (Shortcode UI)](https://wordpress.org/plugins/shortcode-ui/) support.

## [2.7.2] - 2021-06-18
- Added payment method to subscription details when cancelling/renewing a subscription.
- Added refunded amount in payments overview amount column.
Expand Down Expand Up @@ -373,7 +392,8 @@ This projects adheres to [Semantic Versioning](http://semver.org/) and [Keep a C
## 1.0.0
- First release.

[unreleased]: https://github.com/wp-pay/core/compare/2.7.2...HEAD
[unreleased]: https://github.com/wp-pay/core/compare/3.0.0...HEAD
[3.0.0]: https://github.com/wp-pay/core/compare/2.7.2...3.0.0
[2.7.2]: https://github.com/wp-pay/core/compare/2.7.1...2.7.2
[2.7.1]: https://github.com/wp-pay/core/compare/2.7.0...2.7.1
[2.7.0]: https://github.com/wp-pay/core/compare/2.6.2...2.7.0
Expand Down
17 changes: 8 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,27 +50,26 @@
"pronamic/wp-datetime": "^1.2",
"pronamic/wp-html": "^1.0",
"pronamic/wp-http": "^1.0",
"pronamic/wp-money": "^1.2",
"pronamic/wp-money": "^2.0",
"viison/address-splitter": "^0.3.4"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
"overtrue/phplint": "^2.2",
"php-coveralls/php-coveralls": "^2.4",
"php-stubs/wp-cli-stubs": "^2.4",
"phpcompatibility/php-compatibility": "^9.3",
"phpcompatibility/phpcompatibility-wp": "^2.1",
"phpmd/phpmd": "^2.9",
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0",
"pronamic/wp-coding-standards": "^1.0",
"roots/wordpress": "^5.6",
"squizlabs/php_codesniffer": "^3.5",
"wp-cli/wp-cli": "^2.3",
"wp-coding-standards/wpcs": "^2.3",
"wp-phpunit/wp-phpunit": "^5.6",
"wpackagist-plugin/shortcode-ui": "^0.7"
"wp-phpunit/wp-phpunit": "^5.6"
},
"scripts": {
"coverage": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover build/logs/clover.xml --coverage-text",
"coverage-clover": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-clover build/logs/clover.xml",
"coverage-html": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-html build/coverage-html",
"coverage-text": "XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text",
"coveralls": "vendor/bin/php-coveralls -v",
"phpcbf": "vendor/bin/phpcbf",
"phpcs": "XDEBUG_MODE=off vendor/bin/phpcs -s -v",
Expand All @@ -86,7 +85,7 @@
"@xmllint-phpcs"
],
"build-docs": [
"vendor/bin/wp-documentor parse src --format=markdown --relative=docs > docs/hooks.md"
"XDEBUG_MODE=off vendor/bin/wp-documentor parse src --format=markdown --relative=docs > docs/hooks.md"
]
}
}
2 changes: 1 addition & 1 deletion css/forms.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
padding: 0 0 10px;
width: 100%;
}
.pronamic-pay-form .pronamic-pay-amount-input {
.pronamic-pay-form .pronamic-pay-amount-input[type="text"] {
width: auto;
}

Expand Down
8 changes: 7 additions & 1 deletion css/forms.css.map

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

2 changes: 1 addition & 1 deletion css/forms.min.css

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

Loading

0 comments on commit 8bacb63

Please sign in to comment.