Feat: Raise minimum PHP requirement to 7.4

This commit is contained in:
2025-04-18 19:10:45 +01:00
parent 643f5c6d41
commit 6527fde363
4 changed files with 33 additions and 35 deletions

View File

@@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.0', '7.4', '8.0']
php-versions: ['7.4', '8.0']
fail-fast: false
steps:
@@ -27,18 +27,7 @@ jobs:
tools: composer:v2
- name: Install dependencies
run: |
# Install base dependencies from lock file
composer install --prefer-dist --no-progress
# Update specific dependencies for higher PHP versions if needed
if [[ "${{ matrix.php-versions }}" == "7.4" || "${{ matrix.php-versions }}" == "8.0" ]]; then
echo "Updating dependencies for PHP ${{ matrix.php-versions }}..."
composer require --dev phpunit/phpunit:"^9.5" 10up/wp_mock:"^1.0" --no-update --no-plugins --no-scripts
elif [[ "${{ matrix.php-versions }}" == "7.0" ]]; then
# Force PHPUnit 6.5 for PHP 7.0
composer require --dev phpunit/phpunit:"^6.5" --update-with-dependencies
fi
run: composer install --prefer-dist --no-progress
- name: Run tests
run: ./vendor/bin/phpunit

View File

@@ -1,21 +1,21 @@
{
"name": "wpallstars/wp-plugin-starter-template",
"description": "A comprehensive starter template for WordPress plugins with best practices for AI-assisted development.",
"name": "wpallstars/wp-plugin-starter-template-for-ai-coding",
"description": "A starter template for building WordPress plugins, focusing on AI coding assistance compatibility.",
"type": "wordpress-plugin",
"license": "GPL-2.0-or-later",
"authors": [
{
"name": "WPALLSTARS",
"email": "info@wpallstars.com"
"name": "WP All Stars",
"email": "support@wpallstars.com"
}
],
"minimum-stability": "stable",
"require": {
"php": ">=7.0"
"php": ">=7.4"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"10up/wp_mock": "0.3.0",
"10up/wp_mock": "^1.0",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"wp-coding-standards/wpcs": "^3.0",
"phpcompatibility/phpcompatibility-wp": "^2.1"

39
composer.lock generated
View File

@@ -4,33 +4,42 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "e81160902913b563f63aa2ab90c2915a",
"content-hash": "d6c5be2ba3ffdfe4efb6c9662fd167aa",
"packages": [],
"packages-dev": [
{
"name": "10up/wp_mock",
"version": "0.3.0",
"version": "1.1.0",
"source": {
"type": "git",
"url": "https://github.com/10up/wp_mock.git",
"reference": "64956557e98ee4c8c56cd1e396e822adb4673714"
"reference": "f25b5895ed31bf5e7036fe0c666664364ae011c2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/10up/wp_mock/zipball/64956557e98ee4c8c56cd1e396e822adb4673714",
"reference": "64956557e98ee4c8c56cd1e396e822adb4673714",
"url": "https://api.github.com/repos/10up/wp_mock/zipball/f25b5895ed31bf5e7036fe0c666664364ae011c2",
"reference": "f25b5895ed31bf5e7036fe0c666664364ae011c2",
"shasum": ""
},
"require": {
"antecedent/patchwork": "^2.1",
"mockery/mockery": "^1.0",
"php": ">=7.0",
"phpunit/phpunit": ">=6.0"
"mockery/mockery": "^1.6",
"php": ">=7.4 < 9",
"phpunit/phpunit": "^9.6"
},
"require-dev": {
"behat/behat": "^3.0",
"satooshi/php-coveralls": "^1.0",
"sebastian/comparator": ">=1.2.3"
"behat/behat": "^v3.11.0",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7",
"friendsofphp/php-cs-fixer": "^3.4",
"php-coveralls/php-coveralls": "^v2.7",
"php-stubs/wordpress-globals": "^0.2",
"php-stubs/wordpress-stubs": "^6.3",
"phpcompatibility/php-compatibility": "^9.3",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-mockery": "^1.1",
"phpstan/phpstan-phpunit": "^1.3",
"sebastian/comparator": "^4.0.8",
"sempro/phpunit-pretty-print": "^1.4"
},
"type": "library",
"autoload": {
@@ -43,14 +52,14 @@
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"GPL-2.0+"
"BSD-3-Clause"
],
"description": "A mocking library to take the pain out of unit testing for WordPress",
"support": {
"issues": "https://github.com/10up/wp_mock/issues",
"source": "https://github.com/10up/wp_mock/tree/master"
"source": "https://github.com/10up/wp_mock/tree/1.1.0"
},
"time": "2017-12-03T19:28:28+00:00"
"time": "2025-03-12T00:36:13+00:00"
},
{
"name": "antecedent/patchwork",
@@ -2580,7 +2589,7 @@
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=7.0"
"php": ">=7.4"
},
"platform-dev": {},
"plugin-api-version": "2.6.0"

View File

@@ -16,7 +16,7 @@
* Release Branch: main
* Release Asset: true
* Requires at least: 5.0
* Requires PHP: 7.0
* Requires PHP: 7.4
* Update URI: https://github.com/wpallstars/wp-plugin-starter-template-for-ai-coding
*
* Gitea Plugin URI: https://gitea.wpallstars.com/wpallstars/wp-plugin-starter-template-for-ai-coding