mirror of
https://ghproxy.net/https://github.com/elementor/wp2static-addon-s3.git
synced 2025-08-17 19:51:26 +08:00
php8 compat;+code coverage
This commit is contained in:
parent
2d2b921b1a
commit
df7ed9b48f
7 changed files with 35 additions and 29 deletions
6
.github/workflows/codequality.yml
vendored
6
.github/workflows/codequality.yml
vendored
|
@ -13,7 +13,7 @@ jobs:
|
|||
|
||||
strategy:
|
||||
matrix:
|
||||
php: [7.3.9]
|
||||
php: ["7.3", "7.4"]
|
||||
|
||||
name: PHP-${{ matrix.php }}
|
||||
|
||||
|
@ -38,7 +38,7 @@ jobs:
|
|||
run: composer validate --strict
|
||||
|
||||
- name: Install PHP dependencies
|
||||
run: composer install --no-interaction --no-suggest
|
||||
run: composer install --no-interaction
|
||||
|
||||
- name: Run our Linter and PHPStan
|
||||
run: composer test
|
||||
run: composer run-script test
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
## WP2Static S3 Add-on 1.0.1
|
||||
|
||||
- compatibility fix for PHP 8
|
||||
- publish to Packagist
|
||||
- update GH actions for PHP 7.3 and 7.4 testing
|
||||
- PHPStan test PHP 8
|
||||
- expand PHPStan analysis coverage
|
||||
|
||||
## WP2Static S3 Add-on 1.0
|
||||
|
||||
- non-functional dependency updates only but time for a 1.0 release
|
||||
|
|
|
@ -47,9 +47,6 @@
|
|||
}
|
||||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "7.3"
|
||||
},
|
||||
"preferred-install": {
|
||||
"*": "dist"
|
||||
},
|
||||
|
@ -60,14 +57,16 @@
|
|||
"phpcs": "vendor/bin/phpcs --standard=./tools/phpcs.xml --ignore=*/tests/*,*/admin/*,**/coverage/*,*.js,*/vendor/*,*/views/*.php ./",
|
||||
"phpcbf": "vendor/bin/phpcbf --standard=./tools/phpcs.xml --ignore=*/js/*,*/tests/*,*/admin/*,*/coverage/*,*.js,*/vendor/*,*/views/*.php ./",
|
||||
"phpunit": "vendor/bin/phpunit ./tests/unit/",
|
||||
"phpcompat": "vendor/bin/phpcs --standard=PHPCompatibility --runtime-set testVersion 7.3 --ignore=*/tests/*,*/admin/*,**/coverage/*,*.js,*/vendor/*,*/views/*.php ./",
|
||||
"php73": "vendor/bin/phpcs --standard=PHPCompatibility --runtime-set testVersion 7.3 --ignore=*/tests/*,*/admin/*,**/coverage/*,*.js,*/vendor/*,*/views/*.php ./",
|
||||
"php74": "vendor/bin/phpcs --standard=PHPCompatibility --runtime-set testVersion 7.4 --ignore=*/tests/*,*/admin/*,**/coverage/*,*.js,*/vendor/*,*/views/*.php ./",
|
||||
"coverage": "vendor/bin/phpunit tests/unit --coverage-html coverage --whitelist src/",
|
||||
"lint": "vendor/bin/parallel-lint --exclude vendor .",
|
||||
"test": [
|
||||
"composer validate --strict",
|
||||
"@lint",
|
||||
"@phpcs",
|
||||
"@phpcompat",
|
||||
"@php73",
|
||||
"@php74",
|
||||
"@phpstan"
|
||||
],
|
||||
"build": "/bin/sh tools/build_release.sh"
|
||||
|
|
33
composer.lock
generated
33
composer.lock
generated
|
@ -4,20 +4,20 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "36bf1438b3536d362b9c3459085c65e2",
|
||||
"content-hash": "9e3f0e9e0e32ac911b219b876a265782",
|
||||
"packages": [
|
||||
{
|
||||
"name": "aws/aws-sdk-php",
|
||||
"version": "3.166.1",
|
||||
"version": "3.166.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||
"reference": "36788095cfab7850400e337a3128572cfc1537e6"
|
||||
"reference": "fe0ec9235d07b0f51ec4396dce0dd639020ae1a7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/36788095cfab7850400e337a3128572cfc1537e6",
|
||||
"reference": "36788095cfab7850400e337a3128572cfc1537e6",
|
||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/fe0ec9235d07b0f51ec4396dce0dd639020ae1a7",
|
||||
"reference": "fe0ec9235d07b0f51ec4396dce0dd639020ae1a7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -92,9 +92,9 @@
|
|||
"support": {
|
||||
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
|
||||
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.166.1"
|
||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.166.2"
|
||||
},
|
||||
"time": "2020-12-03T19:25:02+00:00"
|
||||
"time": "2020-12-04T19:12:30+00:00"
|
||||
},
|
||||
{
|
||||
"name": "guzzlehttp/guzzle",
|
||||
|
@ -1968,16 +1968,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpunit/phpunit",
|
||||
"version": "9.4.4",
|
||||
"version": "9.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/sebastianbergmann/phpunit.git",
|
||||
"reference": "6535e637961f0829832621dc1b7308c2d24a799e"
|
||||
"reference": "8e16c225d57c3d6808014df6b1dd7598d0a5bbbe"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6535e637961f0829832621dc1b7308c2d24a799e",
|
||||
"reference": "6535e637961f0829832621dc1b7308c2d24a799e",
|
||||
"url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/8e16c225d57c3d6808014df6b1dd7598d0a5bbbe",
|
||||
"reference": "8e16c225d57c3d6808014df6b1dd7598d0a5bbbe",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1993,7 +1993,7 @@
|
|||
"phar-io/version": "^3.0.2",
|
||||
"php": ">=7.3",
|
||||
"phpspec/prophecy": "^1.12.1",
|
||||
"phpunit/php-code-coverage": "^9.2",
|
||||
"phpunit/php-code-coverage": "^9.2.3",
|
||||
"phpunit/php-file-iterator": "^3.0.5",
|
||||
"phpunit/php-invoker": "^3.1.1",
|
||||
"phpunit/php-text-template": "^2.0.3",
|
||||
|
@ -2024,7 +2024,7 @@
|
|||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "9.4-dev"
|
||||
"dev-master": "9.5-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
@ -2055,7 +2055,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/sebastianbergmann/phpunit/issues",
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.4.4"
|
||||
"source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -2067,7 +2067,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2020-12-01T04:58:47+00:00"
|
||||
"time": "2020-12-04T05:05:53+00:00"
|
||||
},
|
||||
{
|
||||
"name": "sebastian/cli-parser",
|
||||
|
@ -3530,8 +3530,5 @@
|
|||
"php": ">=7.3"
|
||||
},
|
||||
"platform-dev": [],
|
||||
"platform-overrides": {
|
||||
"php": "7.3"
|
||||
},
|
||||
"plugin-api-version": "2.0.0"
|
||||
}
|
||||
|
|
|
@ -4,9 +4,11 @@ includes:
|
|||
- vendor/szepeviktor/phpstan-wordpress/extension.neon
|
||||
parameters:
|
||||
level: max
|
||||
phpVersion: 80000
|
||||
inferPrivatePropertyTypeFromConstructor: true
|
||||
paths:
|
||||
- %currentWorkingDirectory%/src/
|
||||
- %currentWorkingDirectory%/wp2static-addon-s3.php
|
||||
scanFiles:
|
||||
- %currentWorkingDirectory%/tests/phpstan/bootstrap.php
|
||||
- %currentWorkingDirectory%/tests/phpstan/wp-cli-stubs-2.2.0.php
|
||||
|
|
|
@ -20,7 +20,7 @@ class CLI {
|
|||
* @param string[] $args CLI args
|
||||
* @param string[] $assoc_args CLI args
|
||||
*/
|
||||
public function s3(
|
||||
public static function s3(
|
||||
array $args,
|
||||
array $assoc_args
|
||||
) : void {
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
* Plugin URI: https://wp2static.com
|
||||
* Description: AWS S3 deployment add-on for WP2Static.
|
||||
* Version: 1.0.1-dev
|
||||
* Requires PHP: 7.3
|
||||
* Author: Leon Stafford
|
||||
* Author URI: https://ljs.dev
|
||||
* License: Unlicense
|
||||
* License URI: http://unlicense.org
|
||||
* Text Domain: wp2static-addon-s3
|
||||
*/
|
||||
|
||||
if ( ! defined( 'WPINC' ) ) {
|
||||
|
@ -23,7 +23,7 @@ if ( file_exists( WP2STATIC_S3_PATH . 'vendor/autoload.php' ) ) {
|
|||
require_once WP2STATIC_S3_PATH . 'vendor/autoload.php';
|
||||
}
|
||||
|
||||
function run_wp2static_addon_s3() {
|
||||
function run_wp2static_addon_s3() : void {
|
||||
$controller = new WP2StaticS3\Controller();
|
||||
$controller->run();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue