Skip to content

Commit 3203c8f

Browse files
Merge pull request #695 from godaddy-wordpress/release/5.13.0
Release: v5.13.0
2 parents 5b46942 + 70f2545 commit 3203c8f

File tree

156 files changed

+1967
-1272
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+1967
-1272
lines changed

.github/workflows/ci.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: CI
2+
3+
on:
4+
workflow_dispatch: # Can manually run from any branch
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
10+
# Cancel previous jobs before starting this one. Works on pull_request event only due to use of head_ref.
11+
# https://docs.github.com/en/actions/using-jobs/using-concurrency
12+
concurrency:
13+
group: ${{ github.head_ref || github.run_id }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
php-tests:
18+
runs-on: ${{ matrix.os }}
19+
strategy:
20+
matrix:
21+
include:
22+
- php: '8.3'
23+
os: 'ubuntu-24.04'
24+
- php: '8.2'
25+
os: 'ubuntu-20.04'
26+
- php: '8.1'
27+
os: 'ubuntu-latest'
28+
- php: '8.0'
29+
os: 'ubuntu-20.04'
30+
- php: '7.4'
31+
os: 'ubuntu-20.04'
32+
fail-fast: false
33+
env:
34+
COVERAGE_CACHE_PATH: phpunit-coverage-cache
35+
PHP_VERSION: ${{ matrix.php }}
36+
37+
steps:
38+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
39+
40+
- name: Switch to PHP ${{ env.PHP_VERSION }}
41+
run: |
42+
sudo update-alternatives --set php /usr/bin/php$PHP_VERSION
43+
sudo update-alternatives --set phar /usr/bin/phar$PHP_VERSION
44+
sudo update-alternatives --set phar.phar /usr/bin/phar.phar$PHP_VERSION
45+
sudo update-alternatives --set phpize /usr/bin/phpize$PHP_VERSION
46+
sudo update-alternatives --set php-config /usr/bin/php-config$PHP_VERSION
47+
48+
- name: Get Composer Cache Directory
49+
id: composer-cache
50+
run: |
51+
echo "::set-output name=dir::$(composer config cache-files-dir)"
52+
53+
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
54+
with:
55+
path: ${{ steps.composer-cache.outputs.dir }}
56+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
57+
restore-keys: |
58+
${{ runner.os }}-composer-
59+
60+
- name: Install Dependencies
61+
run: |
62+
composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
63+
64+
- name: Check platform requirements on PHP ${{ env.PHP_VERSION }}
65+
run: |
66+
composer check-platform-reqs --no-dev --no-interaction --no-scripts
67+
68+
- name: Execute tests via PHPUnit
69+
env:
70+
DB_CONNECTION: sqlite
71+
DB_DATABASE: database/database.sqlite
72+
run: |
73+
vendor/bin/phpunit --order-by="random" --coverage-text

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ npm-debug.log
2525
codeception.yml
2626
.env
2727
/tests/_data/dump.sql
28+
.phpunit.cache/

composer.json

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "skyverge/wc-plugin-framework",
33
"description": "The official SkyVerge WooCommerce plugin framework",
4-
"version": "5.12.7",
4+
"version": "5.13.0",
55
"license": "GPL-3.0",
66
"minimum-stability": "dev",
77
"prefer-stable": true,
@@ -13,11 +13,21 @@
1313
"phpcompatibility/php-compatibility": "9.3.5",
1414
"codeception/module-db": "^1.0",
1515
"codeception/module-phpbrowser": "^1.0",
16-
"codeception/module-asserts": "^1.3"
16+
"codeception/module-asserts": "^1.3",
17+
"10up/wp_mock": "^1.0"
18+
},
19+
"autoload-dev": {
20+
"psr-4": {
21+
"SkyVerge\\WooCommerce\\PluginFramework\\v5_13_0\\Tests\\": "tests/"
22+
}
1723
},
1824
"config": {
1925
"platform": {
2026
"php": "7.4"
27+
},
28+
"allow-plugins": {
29+
"phpstan/extension-installer": true,
30+
"dealerdirect/phpcodesniffer-composer-installer": true
2131
}
2232
}
2333
}

composer.lock

Lines changed: 189 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wc-plugin-framework",
3-
"version": "5.12.7",
3+
"version": "5.13.0",
44
"title": "WooCommerce Plugin Framework",
55
"author": "SkyVerge Team",
66
"homepage": "https://github.com/skyverge/wc-plugin-framework#readme",

phpunit.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
4+
bootstrap="tests/bootstrap.php"
5+
colors="true"
6+
cacheResultFile=".phpunit.cache/test-results"
7+
executionOrder="depends,defects"
8+
forceCoversAnnotation="true"
9+
beStrictAboutCoversAnnotation="false"
10+
beStrictAboutOutputDuringTests="true"
11+
beStrictAboutTodoAnnotatedTests="true"
12+
convertDeprecationsToExceptions="true"
13+
failOnRisky="true"
14+
failOnWarning="true"
15+
verbose="true">
16+
<testsuites>
17+
<testsuite name="Unit">
18+
<directory suffix="Test.php">./tests/unit</directory>
19+
</testsuite>
20+
</testsuites>
21+
22+
<coverage cacheDirectory=".phpunit.cache/code-coverage"
23+
disableCodeCoverageIgnore="true"
24+
includeUncoveredFiles="true"
25+
ignoreDeprecatedCodeUnits="true"
26+
processUncoveredFiles="false">
27+
<include>
28+
<directory suffix=".php">./src</directory>
29+
</include>
30+
</coverage>
31+
</phpunit>

tests/TestCase.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
3+
namespace SkyVerge\WooCommerce\PluginFramework\v5_13_0\Tests;
4+
5+
use WP_Mock\Tools\TestCase as WpMockTestCase;
6+
7+
class TestCase extends WpMockTestCase
8+
{
9+
}

tests/_support/plugins/gateway-test-plugin/gateway-test-plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class SV_WC_Framework_Gateway_Test_Plugin_Loader {
3939
const MINIMUM_WC_VERSION = '3.0.9';
4040

4141
/** SkyVerge plugin framework version used by this plugin */
42-
const FRAMEWORK_VERSION = '5.12.7';
42+
const FRAMEWORK_VERSION = '5.13.0';
4343

4444
/** the plugin name, for displaying notices */
4545
const PLUGIN_NAME = 'WooCommerce Framework Gateway Test Plugin';

0 commit comments

Comments
 (0)