Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
tools: composer
coverage: none
- run: composer install --no-progress
- run: vendor/bin/phpcs
- name: Run PHPCS (changed lines only)
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
vendor/bin/phpcs-changed --git --git-base "${{ github.event.pull_request.base.sha }}"
else
vendor/bin/phpcs-changed --git --git-base "${{ github.event.before }}"
fi
10 changes: 9 additions & 1 deletion .github/workflows/php-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,13 @@ jobs:
php-version: ${{ matrix.php }}
tools: composer
coverage: none
- run: composer install --no-progress
- name: Install dependencies
run: |
if composer install --no-progress 2>&1; then
echo "Updating PHPUnit for best match with PHP ${{ matrix.php }}"
composer update -W --no-progress phpunit/phpunit
else
echo "Platform reqs failed, running composer update for dev dependencies"
composer update --no-progress
fi
- run: composer test-php
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"phan/phan": "^5.4",
"php-stubs/wordpress-stubs": "^6.8",
"php-stubs/wp-cli-stubs": "^2.10",
"automattic/jetpack-codesniffer": "^4.0"
"automattic/jetpack-codesniffer": "^4.0",
"sirbrillig/phpcs-changed": "^2.11"
},
"autoload": {
"classmap": [
Expand Down
56 changes: 55 additions & 1 deletion composer.lock

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

26 changes: 26 additions & 0 deletions phpunit.11.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="tests/php/bootstrap.php"
cacheDirectory=".phpunit.cache"
colors="true"
executionOrder="depends"
beStrictAboutOutputDuringTests="true"
displayDetailsOnPhpunitDeprecations="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerWarnings="true"
failOnDeprecation="true"
failOnEmptyTestSuite="true"
failOnPhpunitDeprecation="true"
failOnNotice="true"
failOnRisky="true"
failOnWarning="true"
>
<testsuites>
<testsuite name="main">
<directory suffix="Test.php">tests/php</directory>
</testsuite>
</testsuites>
</phpunit>
26 changes: 26 additions & 0 deletions phpunit.12.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="tests/php/bootstrap.php"
cacheDirectory=".phpunit.cache"
colors="true"
executionOrder="depends"
beStrictAboutOutputDuringTests="true"
displayDetailsOnPhpunitDeprecations="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerWarnings="true"
failOnDeprecation="true"
failOnEmptyTestSuite="true"
failOnPhpunitDeprecation="true"
failOnNotice="true"
failOnRisky="true"
failOnWarning="true"
>
<testsuites>
<testsuite name="main">
<directory suffix="Test.php">tests/php</directory>
</testsuite>
</testsuites>
</phpunit>
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: donncha, automattic, adnan007, dilirity, mikemayhem3030, pyronaur, thingalon
Tags: performance, caching, wp-cache, wp-super-cache, cache
Requires at least: 6.8
Requires PHP: 7.2
Requires PHP: 7.4
Tested up to: 6.9
Stable tag: 3.0.3
License: GPLv2 or later
Expand Down
Loading