diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 161b444..83ae310 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,93 +1,45 @@
-name: Continuous integration checks
+name: Continuous Integration
on:
- # Run on PRs and pushes, only on significant changes.
push:
branches:
- - develop
- - main
+ - "develop"
+ - "main"
paths-ignore:
- - '**.md'
+ - "**.md"
pull_request:
paths-ignore:
- - '**.md'
+ - "**.md"
-# Prevent multiple unnecessary CI runs on the same branch.
-# Link: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#concurrency
concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
+ group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
jobs:
- phpcs:
- name: PHPCS check on PHP ${{ matrix.php }}
+ phpstan:
+ name: PHP static code analysis using PHP - ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
- php: [ '7.4' ]
-
+ php: [ '8.2', '8.3' ]
steps:
- # Checkout repository
- - name: Checkout
- uses: actions/checkout@v2
-
- # Setup PHP versions, run checks
- - name: PHP setup
- uses: shivammathur/setup-php@v2
+ - name: PHP Static code analysis
+ uses: infinum/eightshift-deploy-actions-public/.github/actions/lint-php-static@main
with:
- php-version: ${{ matrix.php }}
- coverage: none
- tools: cs2pr
- env:
- COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- # Install dependencies and handle caching in one go.
- # @link https://github.com/marketplace/actions/install-composer-dependencies
- - name: Install Composer dependencies
- uses: ramsey/composer-install@v2
- with:
- dependency-versions: highest
- ignore-cache: "yes"
-
- - name: Check coding standards using PHPCS
- continue-on-error: true
- run: composer test:standards -- --runtime-set testVersion ${{ matrix.php }}- --report-full --report-checkstyle=./phpcs-report.xml
-
- - name: Show PHPCS results in PR
- run: cs2pr ./phpcs-report.xml
+ PHP_VERSION: ${{ matrix.php }}
+ PROJECT_PATH: ''
- phpstan:
- name: PHPStan check
+ phpcs:
+ name: PHP check coding standards using PHP - ${{ matrix.php }}
runs-on: ubuntu-latest
- continue-on-error: ${{ matrix.allowed_failure }}
strategy:
fail-fast: false
matrix:
- php: [ '7.4' ]
- allowed_failure: [ true ]
-
+ php: [ '8.2', '8.3' ]
steps:
- # Checkout repository
- - name: Checkout
- uses: actions/checkout@v2
-
- # Setup PHP versions, run checks
- - name: PHP setup
- uses: shivammathur/setup-php@v2
+ - name: PHP check coding standards
+ uses: infinum/eightshift-deploy-actions-public/.github/actions/lint-php@main
with:
- php-version: ${{ matrix.php }}
- coverage: none
- env:
- COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
- # Install dependencies and handle caching in one go.
- # @link https://github.com/marketplace/actions/install-composer-dependencies
- - name: Install Composer dependencies
- uses: ramsey/composer-install@v2
- with:
- dependency-versions: highest
- ignore-cache: "yes"
-
- - name: Check code consistency using PHPStan
- run: composer test:types
+ PHP_VERSION: ${{ matrix.php }}
+ PROJECT_PATH: ''
diff --git a/README.md b/README.md
index b84f966..b3fac47 100644
--- a/README.md
+++ b/README.md
@@ -39,4 +39,4 @@ When submitting issues or otherwise participating in development, please follow
Eightshift Forms is maintained and sponsored by [Infinum](https://infinum.com).
## ⚖️ License
-Eightshift Forms ©2024 [Infinum](https://infinum.com). It is free software, and may be redistributed under the terms specified in the LICENSE file.
+Eightshift Forms [Infinum](https://infinum.com). It is free software, and may be redistributed under the terms specified in the LICENSE file.
diff --git a/composer.json b/composer.json
index f536acd..ae4f59a 100644
--- a/composer.json
+++ b/composer.json
@@ -27,20 +27,15 @@
"source": "https://github.com/infinum/eightshift-forms"
},
"require-dev": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.7.2",
- "infinum/eightshift-coding-standards": "^1.6",
+ "dealerdirect/phpcodesniffer-composer-installer": "^v1.0.0",
+ "infinum/eightshift-coding-standards": "2.0.0-beta",
+ "php-parallel-lint/php-parallel-lint": "^1.3",
"php-stubs/wordpress-stubs": "^6.3",
"szepeviktor/phpstan-wordpress": "^1.3"
},
- "repositories": [
- {
- "type": "vcs",
- "url": "https://github.com/infinum/eightshift-libs.git"
- }
- ],
"require": {
- "php": "^7.4 || >=8.0",
- "infinum/eightshift-libs": "dev-feature/optimizations"
+ "php": ">=8.2",
+ "infinum/eightshift-libs": "dev-develop"
},
"suggest": {
"ext-pcov": "* || This extension is used for code coverage generation. Use either pcov, or xdebug, but not both.",
@@ -63,8 +58,8 @@
},
"scripts": {
"test:types": "@php ./vendor/bin/phpstan analyze",
- "test:standards": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 7.4-",
- "standards:fix": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf --runtime-set testVersion 7.4-",
+ "test:standards": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 8.2-",
+ "standards:fix": "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf --runtime-set testVersion 8.2-",
"test": [
"@test:standards",
"@test:types"
diff --git a/composer.lock b/composer.lock
index c86b8df..2f87a91 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,83 +4,48 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "2473be538ab10e57fd3464c9d43cc70f",
+ "content-hash": "475ccaf428f96c3cce3f7ada5f094f0e",
"packages": [
{
"name": "infinum/eightshift-libs",
- "version": "dev-feature/optimizations",
+ "version": "dev-develop",
"source": {
"type": "git",
"url": "https://github.com/infinum/eightshift-libs.git",
- "reference": "a2c3e3e93be13133102b474db6aaca3d6b4d7db5"
+ "reference": "249a574558abafb9a98d4935577bbe5687ef4eca"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/infinum/eightshift-libs/zipball/a2c3e3e93be13133102b474db6aaca3d6b4d7db5",
- "reference": "a2c3e3e93be13133102b474db6aaca3d6b4d7db5",
+ "url": "https://api.github.com/repos/infinum/eightshift-libs/zipball/249a574558abafb9a98d4935577bbe5687ef4eca",
+ "reference": "249a574558abafb9a98d4935577bbe5687ef4eca",
"shasum": ""
},
"require": {
"ext-dom": "*",
"ext-json": "*",
"ext-libxml": "*",
- "php": "^7.4 || >=8.0",
+ "php": ">=8.2",
"php-di/invoker": "^2.3.4",
"php-di/php-di": "^7"
},
"require-dev": {
- "brain/monkey": "^2.6.1",
"captainhook/captainhook": "^5.10",
"dealerdirect/phpcodesniffer-composer-installer": "^v1.0.0",
"infinum/eightshift-coding-standards": "2.0.0-beta",
- "pestphp/pest": "^1.20",
"php-parallel-lint/php-parallel-lint": "^1.3",
"php-stubs/wordpress-stubs": "^6.3",
"roave/security-advisories": "dev-master",
"szepeviktor/phpstan-wordpress": "^1.3",
- "wp-cli/wp-cli": "^2.9",
- "yoast/wp-test-utils": "^1.0"
+ "wp-cli/wp-cli": "^2.9"
},
+ "default-branch": true,
"type": "library",
"autoload": {
"psr-4": {
- "EightshiftLibs\\": "src/",
- "EightshiftBoilerplate\\": "src/"
+ "EightshiftLibs\\": "src/"
}
},
- "autoload-dev": {
- "psr-4": {
- "Tests\\": "tests/"
- }
- },
- "scripts": {
- "post-autoload-dump": [
- "vendor/bin/captainhook install -f -s"
- ],
- "test:types": [
- "@php ./vendor/bin/phpstan analyze"
- ],
- "test:standards": [
- "@php ./vendor/squizlabs/php_codesniffer/bin/phpcs --runtime-set testVersion 7.4-"
- ],
- "test:unit": [
- "@php ./vendor/bin/pest --group=unit"
- ],
- "test:unit-report": [
- "@php ./vendor/bin/pest --group=unit --log-junit tests/coverage/report.xml"
- ],
- "test:coverage": [
- "@php ./vendor/bin/pest --group=unit --coverage"
- ],
- "standards:fix": [
- "@php ./vendor/squizlabs/php_codesniffer/bin/phpcbf --runtime-set testVersion 7.4-"
- ],
- "test": [
- "@test:standards",
- "@test:types",
- "@test:unit"
- ]
- },
+ "notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
@@ -95,52 +60,51 @@
"description": "WordPress libs developed by Eightshift team to use in modern WordPress.",
"homepage": "https://eightshift.com/",
"keywords": [
- "Gutenberg",
- "WordPress",
"blocks",
"composer",
+ "gutenberg",
"installer",
- "plugin"
+ "plugin",
+ "wordpress"
],
"support": {
"issues": "https://github.com/infinum/eightshift-libs/issues",
"source": "https://github.com/infinum/eightshift-libs"
},
- "time": "2024-04-29T21:20:36+00:00"
+ "time": "2024-05-17T08:39:27+00:00"
},
{
- "name": "opis/closure",
- "version": "3.6.3",
+ "name": "laravel/serializable-closure",
+ "version": "v1.3.3",
"source": {
"type": "git",
- "url": "https://github.com/opis/closure.git",
- "reference": "3d81e4309d2a927abbe66df935f4bb60082805ad"
+ "url": "https://github.com/laravel/serializable-closure.git",
+ "reference": "3dbf8a8e914634c48d389c1234552666b3d43754"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/opis/closure/zipball/3d81e4309d2a927abbe66df935f4bb60082805ad",
- "reference": "3d81e4309d2a927abbe66df935f4bb60082805ad",
+ "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/3dbf8a8e914634c48d389c1234552666b3d43754",
+ "reference": "3dbf8a8e914634c48d389c1234552666b3d43754",
"shasum": ""
},
"require": {
- "php": "^5.4 || ^7.0 || ^8.0"
+ "php": "^7.3|^8.0"
},
"require-dev": {
- "jeremeamia/superclosure": "^2.0",
- "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0"
+ "nesbot/carbon": "^2.61",
+ "pestphp/pest": "^1.21.3",
+ "phpstan/phpstan": "^1.8.2",
+ "symfony/var-dumper": "^5.4.11"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "3.6.x-dev"
+ "dev-master": "1.x-dev"
}
},
"autoload": {
- "files": [
- "functions.php"
- ],
"psr-4": {
- "Opis\\Closure\\": "src/"
+ "Laravel\\SerializableClosure\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -149,29 +113,25 @@
],
"authors": [
{
- "name": "Marius Sarca",
- "email": "marius.sarca@gmail.com"
+ "name": "Taylor Otwell",
+ "email": "taylor@laravel.com"
},
{
- "name": "Sorin Sarca",
- "email": "sarca_sorin@hotmail.com"
+ "name": "Nuno Maduro",
+ "email": "nuno@laravel.com"
}
],
- "description": "A library that can be used to serialize closures (anonymous functions) and arbitrary objects.",
- "homepage": "https://opis.io/closure",
+ "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.",
"keywords": [
- "anonymous functions",
"closure",
- "function",
- "serializable",
- "serialization",
- "serialize"
+ "laravel",
+ "serializable"
],
"support": {
- "issues": "https://github.com/opis/closure/issues",
- "source": "https://github.com/opis/closure/tree/3.6.3"
+ "issues": "https://github.com/laravel/serializable-closure/issues",
+ "source": "https://github.com/laravel/serializable-closure"
},
- "time": "2022-01-27T09:35:39+00:00"
+ "time": "2023-11-08T14:08:06+00:00"
},
{
"name": "php-di/invoker",
@@ -230,39 +190,36 @@
},
{
"name": "php-di/php-di",
- "version": "7.0.0-beta3",
+ "version": "7.0.6",
"source": {
"type": "git",
"url": "https://github.com/PHP-DI/PHP-DI.git",
- "reference": "5762e370a49c5e74e51be2910ab1ffb1f856fe6b"
+ "reference": "8097948a89f6ec782839b3e958432f427cac37fd"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHP-DI/PHP-DI/zipball/5762e370a49c5e74e51be2910ab1ffb1f856fe6b",
- "reference": "5762e370a49c5e74e51be2910ab1ffb1f856fe6b",
+ "url": "https://api.github.com/repos/PHP-DI/PHP-DI/zipball/8097948a89f6ec782839b3e958432f427cac37fd",
+ "reference": "8097948a89f6ec782839b3e958432f427cac37fd",
"shasum": ""
},
"require": {
- "opis/closure": "^3.5.5",
- "php": ">=7.2.0",
+ "laravel/serializable-closure": "^1.0",
+ "php": ">=8.0",
"php-di/invoker": "^2.0",
- "php-di/phpdoc-reader": "^2.0.1",
- "psr/container": "^1.0"
+ "psr/container": "^1.1 || ^2.0"
},
"provide": {
"psr/container-implementation": "^1.0"
},
"require-dev": {
- "doctrine/annotations": "~1.2",
- "friendsofphp/php-cs-fixer": "^2.4",
- "mnapoli/phpunit-easymock": "^1.2",
- "ocramius/proxy-manager": "^2.0.2",
- "phpstan/phpstan": "^0.12",
- "phpunit/phpunit": "^8.5|^9.0"
+ "friendsofphp/php-cs-fixer": "^3",
+ "friendsofphp/proxy-manager-lts": "^1",
+ "mnapoli/phpunit-easymock": "^1.3",
+ "phpunit/phpunit": "^9.5",
+ "vimeo/psalm": "^4.6"
},
"suggest": {
- "doctrine/annotations": "Install it if you want to use annotations (version ~1.2)",
- "ocramius/proxy-manager": "Install it if you want to use lazy injection (version ~2.0)"
+ "friendsofphp/proxy-manager-lts": "Install it if you want to use lazy injection (version ^1)"
},
"type": "library",
"autoload": {
@@ -290,7 +247,7 @@
],
"support": {
"issues": "https://github.com/PHP-DI/PHP-DI/issues",
- "source": "https://github.com/PHP-DI/PHP-DI/tree/7.0.0-beta3"
+ "source": "https://github.com/PHP-DI/PHP-DI/tree/7.0.6"
},
"funding": [
{
@@ -302,68 +259,31 @@
"type": "tidelift"
}
],
- "time": "2021-03-06T20:32:01+00:00"
- },
- {
- "name": "php-di/phpdoc-reader",
- "version": "2.2.1",
- "source": {
- "type": "git",
- "url": "https://github.com/PHP-DI/PhpDocReader.git",
- "reference": "66daff34cbd2627740ffec9469ffbac9f8c8185c"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/PHP-DI/PhpDocReader/zipball/66daff34cbd2627740ffec9469ffbac9f8c8185c",
- "reference": "66daff34cbd2627740ffec9469ffbac9f8c8185c",
- "shasum": ""
- },
- "require": {
- "php": ">=7.2.0"
- },
- "require-dev": {
- "mnapoli/hard-mode": "~0.3.0",
- "phpunit/phpunit": "^8.5|^9.0"
- },
- "type": "library",
- "autoload": {
- "psr-4": {
- "PhpDocReader\\": "src/PhpDocReader"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "description": "PhpDocReader parses @var and @param values in PHP docblocks (supports namespaced class names with the same resolution rules as PHP)",
- "keywords": [
- "phpdoc",
- "reflection"
- ],
- "support": {
- "issues": "https://github.com/PHP-DI/PhpDocReader/issues",
- "source": "https://github.com/PHP-DI/PhpDocReader/tree/2.2.1"
- },
- "time": "2020-10-12T12:39:22+00:00"
+ "time": "2023-11-02T10:04:50+00:00"
},
{
"name": "psr/container",
- "version": "1.1.2",
+ "version": "2.0.2",
"source": {
"type": "git",
"url": "https://github.com/php-fig/container.git",
- "reference": "513e0666f7216c7459170d56df27dfcefe1689ea"
+ "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea",
- "reference": "513e0666f7216c7459170d56df27dfcefe1689ea",
+ "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963",
+ "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963",
"shasum": ""
},
"require": {
"php": ">=7.4.0"
},
"type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
"autoload": {
"psr-4": {
"Psr\\Container\\": "src/"
@@ -390,43 +310,46 @@
],
"support": {
"issues": "https://github.com/php-fig/container/issues",
- "source": "https://github.com/php-fig/container/tree/1.1.2"
+ "source": "https://github.com/php-fig/container/tree/2.0.2"
},
- "time": "2021-11-05T16:50:12+00:00"
+ "time": "2021-11-05T16:47:00+00:00"
}
],
"packages-dev": [
{
"name": "dealerdirect/phpcodesniffer-composer-installer",
- "version": "v0.7.2",
+ "version": "v1.0.0",
"source": {
"type": "git",
- "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
- "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db"
+ "url": "https://github.com/PHPCSStandards/composer-installer.git",
+ "reference": "4be43904336affa5c2f70744a348312336afd0da"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db",
- "reference": "1c968e542d8843d7cd71de3c5c9c3ff3ad71a1db",
+ "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da",
+ "reference": "4be43904336affa5c2f70744a348312336afd0da",
"shasum": ""
},
"require": {
"composer-plugin-api": "^1.0 || ^2.0",
- "php": ">=5.3",
+ "php": ">=5.4",
"squizlabs/php_codesniffer": "^2.0 || ^3.1.0 || ^4.0"
},
"require-dev": {
"composer/composer": "*",
+ "ext-json": "*",
+ "ext-zip": "*",
"php-parallel-lint/php-parallel-lint": "^1.3.1",
- "phpcompatibility/php-compatibility": "^9.0"
+ "phpcompatibility/php-compatibility": "^9.0",
+ "yoast/phpunit-polyfills": "^1.0"
},
"type": "composer-plugin",
"extra": {
- "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
+ "class": "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin"
},
"autoload": {
"psr-4": {
- "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
+ "PHPCSStandards\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -442,7 +365,7 @@
},
{
"name": "Contributors",
- "homepage": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer/graphs/contributors"
+ "homepage": "https://github.com/PHPCSStandards/composer-installer/graphs/contributors"
}
],
"description": "PHP_CodeSniffer Standards Composer Installer Plugin",
@@ -466,39 +389,36 @@
"tests"
],
"support": {
- "issues": "https://github.com/dealerdirect/phpcodesniffer-composer-installer/issues",
- "source": "https://github.com/dealerdirect/phpcodesniffer-composer-installer"
+ "issues": "https://github.com/PHPCSStandards/composer-installer/issues",
+ "source": "https://github.com/PHPCSStandards/composer-installer"
},
- "time": "2022-02-04T12:51:07+00:00"
+ "time": "2023-01-05T11:28:13+00:00"
},
{
"name": "infinum/eightshift-coding-standards",
- "version": "1.6.0",
+ "version": "2.0.0-beta",
"source": {
"type": "git",
"url": "https://github.com/infinum/eightshift-coding-standards.git",
- "reference": "9441a91fe334258886a443e2236f6f07b1f5c17d"
+ "reference": "57719e1c758e48129b5fd03a88859b7f4afa2dd9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/infinum/eightshift-coding-standards/zipball/9441a91fe334258886a443e2236f6f07b1f5c17d",
- "reference": "9441a91fe334258886a443e2236f6f07b1f5c17d",
+ "url": "https://api.github.com/repos/infinum/eightshift-coding-standards/zipball/57719e1c758e48129b5fd03a88859b7f4afa2dd9",
+ "reference": "57719e1c758e48129b5fd03a88859b7f4afa2dd9",
"shasum": ""
},
"require": {
- "php": "^7.2",
- "phpcompatibility/phpcompatibility-wp": "^2.1.1",
- "phpcsstandards/phpcsextra": "^1.0",
- "phpcsstandards/phpcsutils": "^1.0",
- "slevomat/coding-standard": "^7.0",
- "squizlabs/php_codesniffer": "^3.6.0",
- "wp-coding-standards/wpcs": "^2.3.0"
+ "php": ">=7.4",
+ "phpcompatibility/phpcompatibility-wp": "^2.1.4",
+ "slevomat/coding-standard": "^8.13.0",
+ "wp-coding-standards/wpcs": "dev-hotifx/escape-output-sniff"
},
"require-dev": {
"php-parallel-lint/php-console-highlighter": "^1.0.0",
"php-parallel-lint/php-parallel-lint": "^1.3.2",
- "phpcsstandards/phpcsdevtools": "^1.0",
- "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0",
+ "phpcsstandards/phpcsdevtools": "^1.2.0",
+ "phpunit/phpunit": "^7.0",
"roave/security-advisories": "dev-master"
},
"type": "phpcodesniffer-standard",
@@ -529,20 +449,81 @@
"issues": "https://github.com/infinum/eightshift-coding-standards/issues",
"source": "https://github.com/infinum/eightshift-coding-standards"
},
- "time": "2022-07-05T14:21:49+00:00"
+ "time": "2023-09-22T13:43:43+00:00"
+ },
+ {
+ "name": "php-parallel-lint/php-parallel-lint",
+ "version": "v1.4.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/php-parallel-lint/PHP-Parallel-Lint.git",
+ "reference": "6db563514f27e19595a19f45a4bf757b6401194e"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/php-parallel-lint/PHP-Parallel-Lint/zipball/6db563514f27e19595a19f45a4bf757b6401194e",
+ "reference": "6db563514f27e19595a19f45a4bf757b6401194e",
+ "shasum": ""
+ },
+ "require": {
+ "ext-json": "*",
+ "php": ">=5.3.0"
+ },
+ "replace": {
+ "grogy/php-parallel-lint": "*",
+ "jakub-onderka/php-parallel-lint": "*"
+ },
+ "require-dev": {
+ "nette/tester": "^1.3 || ^2.0",
+ "php-parallel-lint/php-console-highlighter": "0.* || ^1.0",
+ "squizlabs/php_codesniffer": "^3.6"
+ },
+ "suggest": {
+ "php-parallel-lint/php-console-highlighter": "Highlight syntax in code snippet"
+ },
+ "bin": [
+ "parallel-lint"
+ ],
+ "type": "library",
+ "autoload": {
+ "classmap": [
+ "./src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-2-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Jakub Onderka",
+ "email": "ahoj@jakubonderka.cz"
+ }
+ ],
+ "description": "This tool checks the syntax of PHP files about 20x faster than serial check.",
+ "homepage": "https://github.com/php-parallel-lint/PHP-Parallel-Lint",
+ "keywords": [
+ "lint",
+ "static analysis"
+ ],
+ "support": {
+ "issues": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/issues",
+ "source": "https://github.com/php-parallel-lint/PHP-Parallel-Lint/tree/v1.4.0"
+ },
+ "time": "2024-03-27T12:14:49+00:00"
},
{
"name": "php-stubs/wordpress-stubs",
- "version": "v6.5.2",
+ "version": "v6.5.3",
"source": {
"type": "git",
"url": "https://github.com/php-stubs/wordpress-stubs.git",
- "reference": "379f17a90c01498d4c99a0d15aab6e7aa6a2c840"
+ "reference": "e611a83292d02055a25f83291a98fadd0c21e092"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/379f17a90c01498d4c99a0d15aab6e7aa6a2c840",
- "reference": "379f17a90c01498d4c99a0d15aab6e7aa6a2c840",
+ "url": "https://api.github.com/repos/php-stubs/wordpress-stubs/zipball/e611a83292d02055a25f83291a98fadd0c21e092",
+ "reference": "e611a83292d02055a25f83291a98fadd0c21e092",
"shasum": ""
},
"require-dev": {
@@ -574,9 +555,9 @@
],
"support": {
"issues": "https://github.com/php-stubs/wordpress-stubs/issues",
- "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.5.2"
+ "source": "https://github.com/php-stubs/wordpress-stubs/tree/v6.5.3"
},
- "time": "2024-04-14T17:30:14+00:00"
+ "time": "2024-05-08T02:12:31+00:00"
},
{
"name": "phpcompatibility/php-compatibility",
@@ -950,16 +931,16 @@
},
{
"name": "phpstan/phpdoc-parser",
- "version": "1.28.0",
+ "version": "1.29.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git",
- "reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb"
+ "reference": "536889f2b340489d328f5ffb7b02bb6b183ddedc"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb",
- "reference": "cd06d6b1a1b3c75b0b83f97577869fd85a3cd4fb",
+ "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/536889f2b340489d328f5ffb7b02bb6b183ddedc",
+ "reference": "536889f2b340489d328f5ffb7b02bb6b183ddedc",
"shasum": ""
},
"require": {
@@ -991,22 +972,22 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
- "source": "https://github.com/phpstan/phpdoc-parser/tree/1.28.0"
+ "source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.0"
},
- "time": "2024-04-03T18:51:33+00:00"
+ "time": "2024-05-06T12:04:23+00:00"
},
{
"name": "phpstan/phpstan",
- "version": "1.10.67",
+ "version": "1.11.1",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493"
+ "reference": "e524358f930e41a2b4cca1320e3b04fc26b39e0b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/16ddbe776f10da6a95ebd25de7c1dbed397dc493",
- "reference": "16ddbe776f10da6a95ebd25de7c1dbed397dc493",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e524358f930e41a2b4cca1320e3b04fc26b39e0b",
+ "reference": "e524358f930e41a2b4cca1320e3b04fc26b39e0b",
"shasum": ""
},
"require": {
@@ -1051,46 +1032,46 @@
"type": "github"
}
],
- "time": "2024-04-16T07:22:02+00:00"
+ "time": "2024-05-15T08:00:59+00:00"
},
{
"name": "slevomat/coding-standard",
- "version": "7.2.1",
+ "version": "8.15.0",
"source": {
"type": "git",
"url": "https://github.com/slevomat/coding-standard.git",
- "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90"
+ "reference": "7d1d957421618a3803b593ec31ace470177d7817"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/aff06ae7a84e4534bf6f821dc982a93a5d477c90",
- "reference": "aff06ae7a84e4534bf6f821dc982a93a5d477c90",
+ "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/7d1d957421618a3803b593ec31ace470177d7817",
+ "reference": "7d1d957421618a3803b593ec31ace470177d7817",
"shasum": ""
},
"require": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7",
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.6.2 || ^0.7 || ^1.0",
"php": "^7.2 || ^8.0",
- "phpstan/phpdoc-parser": "^1.5.1",
- "squizlabs/php_codesniffer": "^3.6.2"
+ "phpstan/phpdoc-parser": "^1.23.1",
+ "squizlabs/php_codesniffer": "^3.9.0"
},
"require-dev": {
- "phing/phing": "2.17.3",
+ "phing/phing": "2.17.4",
"php-parallel-lint/php-parallel-lint": "1.3.2",
- "phpstan/phpstan": "1.4.10|1.7.1",
- "phpstan/phpstan-deprecation-rules": "1.0.0",
- "phpstan/phpstan-phpunit": "1.0.0|1.1.1",
- "phpstan/phpstan-strict-rules": "1.2.3",
- "phpunit/phpunit": "7.5.20|8.5.21|9.5.20"
+ "phpstan/phpstan": "1.10.60",
+ "phpstan/phpstan-deprecation-rules": "1.1.4",
+ "phpstan/phpstan-phpunit": "1.3.16",
+ "phpstan/phpstan-strict-rules": "1.5.2",
+ "phpunit/phpunit": "8.5.21|9.6.8|10.5.11"
},
"type": "phpcodesniffer-standard",
"extra": {
"branch-alias": {
- "dev-master": "7.x-dev"
+ "dev-master": "8.x-dev"
}
},
"autoload": {
"psr-4": {
- "SlevomatCodingStandard\\": "SlevomatCodingStandard"
+ "SlevomatCodingStandard\\": "SlevomatCodingStandard/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -1098,9 +1079,13 @@
"MIT"
],
"description": "Slevomat Coding Standard for PHP_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.",
+ "keywords": [
+ "dev",
+ "phpcs"
+ ],
"support": {
"issues": "https://github.com/slevomat/coding-standard/issues",
- "source": "https://github.com/slevomat/coding-standard/tree/7.2.1"
+ "source": "https://github.com/slevomat/coding-standard/tree/8.15.0"
},
"funding": [
{
@@ -1112,7 +1097,7 @@
"type": "tidelift"
}
],
- "time": "2022-05-25T10:58:12+00:00"
+ "time": "2024-03-09T15:20:58+00:00"
},
{
"name": "squizlabs/php_codesniffer",
@@ -1334,30 +1319,38 @@
},
{
"name": "wp-coding-standards/wpcs",
- "version": "2.3.0",
+ "version": "dev-hotifx/escape-output-sniff",
"source": {
"type": "git",
"url": "https://github.com/WordPress/WordPress-Coding-Standards.git",
- "reference": "7da1894633f168fe244afc6de00d141f27517b62"
+ "reference": "4a4849258060bd74bb396f00dd3771510949314b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62",
- "reference": "7da1894633f168fe244afc6de00d141f27517b62",
+ "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/4a4849258060bd74bb396f00dd3771510949314b",
+ "reference": "4a4849258060bd74bb396f00dd3771510949314b",
"shasum": ""
},
"require": {
+ "ext-filter": "*",
+ "ext-libxml": "*",
+ "ext-tokenizer": "*",
+ "ext-xmlreader": "*",
"php": ">=5.4",
- "squizlabs/php_codesniffer": "^3.3.1"
+ "phpcsstandards/phpcsextra": "^1.1.0",
+ "phpcsstandards/phpcsutils": "^1.0.8",
+ "squizlabs/php_codesniffer": "^3.7.2"
},
"require-dev": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6",
+ "php-parallel-lint/php-console-highlighter": "^1.0.0",
+ "php-parallel-lint/php-parallel-lint": "^1.3.2",
"phpcompatibility/php-compatibility": "^9.0",
- "phpcsstandards/phpcsdevtools": "^1.0",
+ "phpcsstandards/phpcsdevtools": "^1.2.0",
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
},
"suggest": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
+ "ext-iconv": "For improved results",
+ "ext-mbstring": "For improved results"
},
"type": "phpcodesniffer-standard",
"notification-url": "https://packagist.org/downloads/",
@@ -1374,6 +1367,7 @@
"keywords": [
"phpcs",
"standards",
+ "static analysis",
"wordpress"
],
"support": {
@@ -1381,7 +1375,13 @@
"source": "https://github.com/WordPress/WordPress-Coding-Standards",
"wiki": "https://github.com/WordPress/WordPress-Coding-Standards/wiki"
},
- "time": "2020-05-13T23:57:56+00:00"
+ "funding": [
+ {
+ "url": "https://opencollective.com/thewpcc/contribute/wp-php-63406",
+ "type": "custom"
+ }
+ ],
+ "time": "2023-09-22T11:39:02+00:00"
}
],
"aliases": [],
@@ -1392,7 +1392,7 @@
"prefer-stable": true,
"prefer-lowest": false,
"platform": {
- "php": "^7.4 || >=8.0"
+ "php": ">=8.2"
},
"platform-dev": [],
"plugin-api-version": "2.6.0"
diff --git a/phpcs.xml.dist b/phpcs.xml.dist
index 6e8e868..08cdea7 100644
--- a/phpcs.xml.dist
+++ b/phpcs.xml.dist
@@ -19,10 +19,10 @@
.
-
+
-
+
/src/CompiledContainer\.php
diff --git a/phpstan.neon.dist b/phpstan.neon.dist
index 6ad6ede..4160a79 100644
--- a/phpstan.neon.dist
+++ b/phpstan.neon.dist
@@ -10,4 +10,6 @@ parameters:
- src/
excludePaths:
- src/**/*Example.php
- checkGenericClassInNonGenericObjectType: false
+ ignoreErrors:
+ - identifier: missingType.generics
+
diff --git a/src/Helpers/UtilsUploadHelper.php b/src/Helpers/UtilsUploadHelper.php
index 8f18eac..4ee66d5 100644
--- a/src/Helpers/UtilsUploadHelper.php
+++ b/src/Helpers/UtilsUploadHelper.php
@@ -100,7 +100,7 @@ public static function uploadFile(array $file): array
}
if (!\is_dir($folderPath)) {
- $newFolder = \mkdir($folderPath);
+ $newFolder = \mkdir($folderPath); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_mkdir
if (!$newFolder) {
return \array_merge(
@@ -173,7 +173,7 @@ public static function deleteFiles(array $files): void
foreach ($items as $file) {
if (\file_exists($file['path'])) {
- \unlink($file['path']);
+ \unlink($file['path']); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_mkdir, WordPress.WP.AlternativeFunctions.unlink_unlink
}
}
}
@@ -210,7 +210,7 @@ public static function deleteUploadFolderContent(int $numberOfHours = 2): void
}
// Remove old files.
- \unlink($file);
+ \unlink($file); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_mkdir, WordPress.WP.AlternativeFunctions.unlink_unlink
}
}