diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index f795a6ed..755aa754 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -24,7 +24,7 @@ jobs: - name: Setup PHP with Xdebug 2.x uses: shivammathur/setup-php@v2 with: - php-version: '7.4' + php-version: '8.3' coverage: xdebug2 - name: Set up PHPCS and WordPress-Coding-Standards @@ -32,7 +32,7 @@ jobs: env: COMPOSER: "composer.json" with: - php_version: "7.4" + php_version: "8.3" version: "2.3.7" args: "--ignore-platform-reqs --optimize-autoloader" @@ -40,9 +40,5 @@ jobs: run: | vendor/bin/phpcs -p . --extensions=php --ignore=vendor,node_modules,src,js,css,sass --standard=phpcs.xml - - name: Test for PHP8.3 compatibility - run: | - vendor/bin/phpcs -p . --extensions=php --ignore=vendor,node_modules,src,js,css,sass --standard=PHPCompatibility --runtime-set testVersion 8.3 - - name: Test PHP for syntax errors run: find -L . -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e57413c..80d6cd8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ * Fix accessibility strings always getting english versions if set to be translated via polylang * Merge pull request #212 from digitoimistodude/dependabot/npm_and_yarn/ip-2.0.1 * Add unit tests for PHPCompatibility +* Upgrade PHP version in use to PHP 8.3 +* Require PHP 8.3 ### 9.3.6: 2024-01-10 diff --git a/bin/tasks/additions.sh b/bin/tasks/additions.sh index b5ce692d..26d76d4f 100644 --- a/bin/tasks/additions.sh +++ b/bin/tasks/additions.sh @@ -12,7 +12,7 @@ echo "${YELLOW}Generating default README.md...${TXTRESET}" NEWEST_AIR_VERSION="9.3.6" NEWEST_WORDPRESS_VERSION="6.4.2" -NEWEST_PHP_VERSION="7.4" +NEWEST_PHP_VERSION="8.3" CURRENT_DATE=$(LC_TIME=en_US date '+%d %b %Y' |tr ' ' '_'); echo "# ${PROJECT_NAME} ![based_on_air_version ${NEWEST_AIR_VERSION}_](https://img.shields.io/badge/based_on_air_version-${NEWEST_AIR_VERSION}_-brightgreen.svg?style=flat-square) ![project_created ${CURRENT_DATE}](https://img.shields.io/badge/project_created-${CURRENT_DATE}-blue.svg?style=flat-square) ![Tested_up_to WordPress_${NEWEST_WORDPRESS_VERSION}](https://img.shields.io/badge/Tested_up_to-WordPress_${NEWEST_WORDPRESS_VERSION}-blue.svg?style=flat-square) ![Compatible_with PHP_${NEWEST_PHP_VERSION}](https://img.shields.io/badge/Compatible_with-PHP_${NEWEST_PHP_VERSION}-green.svg?style=flat-square) diff --git a/composer.json b/composer.json index 113b7a4d..d914d357 100644 --- a/composer.json +++ b/composer.json @@ -1,14 +1,14 @@ { - "config": { - "allow-plugins": { - "dealerdirect/phpcodesniffer-composer-installer": true - } - }, - "require-dev": { - "wp-coding-standards/wpcs": "^2.3.0", - "phpcompatibility/php-compatibility": "*", - "phpcsstandards/phpcsutils": "^1.0", - "squizlabs/php_codesniffer": "*", - "phpcsstandards/phpcsextra": "^1.2.0" + "config": { + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true } + }, + "require-dev": { + "wp-coding-standards/wpcs": "^2.3.0", + "phpcompatibility/php-compatibility": "dev-develop", + "phpcsstandards/phpcsutils": "^1.0", + "squizlabs/php_codesniffer": "*", + "phpcsstandards/phpcsextra": "^1.2.0" + } } diff --git a/composer.lock b/composer.lock index b995aafd..6ca7b2b7 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e8307b9fa250ee31dedfdf8eb990da96", + "content-hash": "5c382c2c0e654f5df7d15b8088372cea", "packages": [], "packages-dev": [ { @@ -87,33 +87,45 @@ }, { "name": "phpcompatibility/php-compatibility", - "version": "9.3.5", + "version": "dev-develop", "source": { "type": "git", "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", - "reference": "9fb324479acf6f39452e0655d2429cc0d3914243" + "reference": "e5cd2e244097fb62c5ac8f1153a26a73c3a50438" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243", - "reference": "9fb324479acf6f39452e0655d2429cc0d3914243", + "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/e5cd2e244097fb62c5ac8f1153a26a73c3a50438", + "reference": "e5cd2e244097fb62c5ac8f1153a26a73c3a50438", "shasum": "" }, "require": { - "php": ">=5.3", - "squizlabs/php_codesniffer": "^2.3 || ^3.0.2" + "php": ">=5.4", + "phpcsstandards/phpcsutils": "^1.0.9", + "squizlabs/php_codesniffer": "^3.8.0" }, - "conflict": { - "squizlabs/php_codesniffer": "2.6.2" + "replace": { + "wimg/php-compatibility": "*" }, "require-dev": { - "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0" + "php-parallel-lint/php-console-highlighter": "^1.0.0", + "php-parallel-lint/php-parallel-lint": "^1.3.2", + "phpcsstandards/phpcsdevcs": "^1.1.3", + "phpcsstandards/phpcsdevtools": "^1.2.0", + "phpunit/phpunit": "^4.8.36 || ^5.7.21 || ^6.0 || ^7.0 || ^8.0 || ^9.3.4 || ^10.1.0", + "yoast/phpunit-polyfills": "^1.0.5 || ^2.0.0" }, "suggest": { - "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.", "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." }, + "default-branch": true, "type": "phpcodesniffer-standard", + "extra": { + "branch-alias": { + "dev-master": "9.x-dev", + "dev-develop": "10.x-dev" + } + }, "notification-url": "https://packagist.org/downloads/", "license": [ "LGPL-3.0-or-later" @@ -139,13 +151,29 @@ "keywords": [ "compatibility", "phpcs", - "standards" + "standards", + "static analysis" ], "support": { "issues": "https://github.com/PHPCompatibility/PHPCompatibility/issues", + "security": "https://github.com/PHPCompatibility/PHPCompatibility/security/policy", "source": "https://github.com/PHPCompatibility/PHPCompatibility" }, - "time": "2019-12-27T09:44:58+00:00" + "funding": [ + { + "url": "https://github.com/PHPCompatibility", + "type": "github" + }, + { + "url": "https://github.com/jrfnl", + "type": "github" + }, + { + "url": "https://opencollective.com/php_codesniffer", + "type": "open_collective" + } + ], + "time": "2024-02-12T16:57:44+00:00" }, { "name": "phpcsstandards/phpcsextra", @@ -447,7 +475,9 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "phpcompatibility/php-compatibility": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": [], diff --git a/phpcs.xml b/phpcs.xml index 2eee7d91..734bea52 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -128,6 +128,6 @@ - + diff --git a/style.css b/style.css index 76631923..2ddc6616 100644 --- a/style.css +++ b/style.css @@ -24,7 +24,7 @@ If you see this, contact the site admin. @since 2016-01-28 Tested up to: 6.4.2 -Requires PHP: 7.4 +Requires PHP: 8.3 License: MIT License License URI: LICENSE Text Domain: air-light