Skip to content

Commit

Permalink
require PHP 7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
stklcode committed Mar 14, 2024
1 parent 77a8873 commit dab60c9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
strategy:
matrix:
include:
- php: '5.6'
- php: '7.2'
wordpress: '4.7'
- php: '7.4'
wordpress: '5.9'
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"statistics"
],
"require": {
"php": "^5.3|^7|^8",
"php": "^7.2|^8",
"npm-asset/chartist": "^1.3.0",
"npm-asset/chartist-plugin-tooltips-updated": "^1.0.0",
"jaybizzle/crawler-detect": "^1.2"
Expand All @@ -18,10 +18,10 @@
"dealerdirect/phpcodesniffer-composer-installer": "^v1.0.0",
"matthiasmullie/minify": "^1.3",
"slowprog/composer-copy-file": "^0.3",
"squizlabs/php_codesniffer": "^3.8",
"squizlabs/php_codesniffer": "^3.9",
"phpcompatibility/phpcompatibility-wp": "^2.1",
"wp-coding-standards/wpcs": "^3.0",
"phpunit/phpunit": "^5|^7|^9",
"phpunit/phpunit": "^8|^9",
"yoast/phpunit-polyfills": "^2.0"
},
"repositories": [
Expand Down
2 changes: 1 addition & 1 deletion phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
</rule>

<!-- Include sniffs for PHP cross-version compatibility. -->
<config name="testVersion" value="5.3-"/>
<config name="testVersion" value="7.2-"/>
<rule ref="PHPCompatibilityWP"/>
</ruleset>
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Tags: analytics, dashboard, pageviews, privacy, statistics, stats, visits, web stats, widget
* Requires at least: 4.7
* Tested up to: 6.3
* Requires PHP: 5.3
* Requires PHP: 7.2
* Stable tag: 1.8.4
* License: GPLv3 or later
* License URI: https://www.gnu.org/licenses/gpl-3.0.html
Expand Down
5 changes: 5 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
* @package Statify
*/

// Include polyfills autoloader.
if ( false === class_exists( '\Yoast\PHPUnitPolyfills\Autoload' ) ) {
require_once 'vendor/yoast/phpunit-polyfills/phpunitpolyfills-autoload.php';
}

$_tests_dir = getenv( 'WP_TESTS_DIR' );

if ( ! $_tests_dir ) {
Expand Down

0 comments on commit dab60c9

Please sign in to comment.