diff --git a/.github/workflows/wp-compatibility-test.yml b/.github/workflows/wp-compatibility-test.yml index 9cbecdd..6b6a023 100644 --- a/.github/workflows/wp-compatibility-test.yml +++ b/.github/workflows/wp-compatibility-test.yml @@ -1660,6 +1660,9 @@ jobs: # The WordPress test library still calls PHPUnit APIs removed in PHPUnit 10+. # Keep this generated integration-test job on PHPUnit 9.6 while the rest # of the project can continue using newer Composer-resolved QA tooling. + # This job does not run Psalm, and Psalm 7.4+ requires psalm/plugin-phpunit, whose + # 1.x releases conflict with PHPUnit below 11: remove Psalm first. + composer remove --dev vimeo/psalm --no-interaction --no-progress if [ "${{ matrix.dependency-versions }}" = "lowest" ]; then composer require --dev phpunit/phpunit:"^9.6" yoast/phpunit-polyfills:"^4.0" --with-all-dependencies --prefer-lowest --no-progress else diff --git a/CHANGELOG.md b/CHANGELOG.md index 89439ec..c1d7224 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -33,6 +33,7 @@ see the current README and Security Policy for supported behavior and guidance. - **Rector**: A new Rector job runs `rector process --dry-run` with `rector.php` and fails when PHP 8.3 or Rector's dead-code, code-quality, type-declaration, or early-return rules would change the code. `rector.php` skips the rules that conflict with WordPress, each with its reason; `composer rector` runs the same check, and `composer check-all` includes it. - **Modern JavaScript and Browser Support**: ESLint also applies `eslint-plugin-unicorn` rules for modern built-ins and patterns, and `eslint-plugin-compat` fails on a browser API that WordPress's supported browsers lack. Stylelint does the same for CSS with `stylelint-no-unsupported-browser-features`. Both read the browser list from `@wordpress/browserslist-config`. - **Arrays**: PHPCS now requires the short array syntax, the form all EngineScript plugins use. +- **Psalm 7**: Static analysis runs on Psalm 7. It found six `(string)` casts of request values that `is_string()` had already checked, which are removed. The included files' direct-access guards carry a Psalm note, because Psalm 7.5 reads them as already decided by the main file's own check; they still stop a direct request. Psalm no longer checks the comments in the WordPress stubs, which Psalm 7 rejects in places. Behavior is unchanged. - **npm Advisories**: `package.json` overrides `smol-toml`, `katex`, and `re2js` (used by the Markdown linter) with releases that fix their advisories. - **Workflow Names**: The JavaScript test job is now "JavaScript Tests (Node 24)", the name it has in the other EngineScript plugins. Three issue templates that no workflow used were removed. diff --git a/composer.json b/composer.json index bda0115..7b47b19 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,7 @@ "dealerdirect/phpcodesniffer-composer-installer": "^1.2", "friendsofphp/php-cs-fixer": "^3.95", "phpmd/phpmd": "^3.0", - "vimeo/psalm": "^6.16", + "vimeo/psalm": "^7.0", "php-stubs/wordpress-stubs": "^7.1.2", "szepeviktor/phpstan-wordpress": "^2.0", "phpstan/phpstan": "^2.3.1", diff --git a/composer.lock b/composer.lock index bfa595d..6766866 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": "9702282b634f7abf282f27ddcff1e1c7", + "content-hash": "ff4229bd206efa25c43e251403675070", "packages": [], "packages-dev": [ { @@ -532,16 +532,16 @@ }, { "name": "amphp/process", - "version": "v2.1.1", + "version": "v2.1.2", "source": { "type": "git", "url": "https://github.com/amphp/process.git", - "reference": "6ee0d11112a9b1338b7dc270d51f254e872c90b5" + "reference": "acfd64f68df5fa7f2d674c93d1986b2bf5d02770" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/process/zipball/6ee0d11112a9b1338b7dc270d51f254e872c90b5", - "reference": "6ee0d11112a9b1338b7dc270d51f254e872c90b5", + "url": "https://api.github.com/repos/amphp/process/zipball/acfd64f68df5fa7f2d674c93d1986b2bf5d02770", + "reference": "acfd64f68df5fa7f2d674c93d1986b2bf5d02770", "shasum": "" }, "require": { @@ -588,7 +588,7 @@ "homepage": "https://amphp.org/process", "support": { "issues": "https://github.com/amphp/process/issues", - "source": "https://github.com/amphp/process/tree/v2.1.1" + "source": "https://github.com/amphp/process/tree/v2.1.2" }, "funding": [ { @@ -596,7 +596,7 @@ "type": "github" } ], - "time": "2026-11-01T22:46:42+00:00" + "time": "2026-11-07T16:33:32+00:00" }, { "name": "amphp/serialization", @@ -667,16 +667,16 @@ }, { "name": "amphp/socket", - "version": "v2.4.1", + "version": "v2.4.2", "source": { "type": "git", "url": "https://github.com/amphp/socket.git", - "reference": "b347be5aff6b2cc025208bb4d896607eb470c018" + "reference": "6e881835c73b75a0a4251a7f58441bc90b9f6c8a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amphp/socket/zipball/b347be5aff6b2cc025208bb4d896607eb470c018", - "reference": "b347be5aff6b2cc025208bb4d896607eb470c018", + "url": "https://api.github.com/repos/amphp/socket/zipball/6e881835c73b75a0a4251a7f58441bc90b9f6c8a", + "reference": "6e881835c73b75a0a4251a7f58441bc90b9f6c8a", "shasum": "" }, "require": { @@ -739,7 +739,7 @@ ], "support": { "issues": "https://github.com/amphp/socket/issues", - "source": "https://github.com/amphp/socket/tree/v2.4.1" + "source": "https://github.com/amphp/socket/tree/v2.4.2" }, "funding": [ { @@ -747,7 +747,7 @@ "type": "github" } ], - "time": "2026-08-22T18:13:20+00:00" + "time": "2026-11-11T03:42:20+00:00" }, { "name": "amphp/sync", @@ -1392,20 +1392,20 @@ }, { "name": "doctrine/deprecations", - "version": "1.1.6", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/deprecations.git", - "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca" + "reference": "d2e16653a734c8784c1851ad68b02f997b53ca82" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/deprecations/zipball/d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", - "reference": "d4fe3e6fd9bb9e72557a19674f44d8ac7db4c6ca", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/d2e16653a734c8784c1851ad68b02f997b53ca82", + "reference": "d2e16653a734c8784c1851ad68b02f997b53ca82", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^7.4 || ^8.0" }, "conflict": { "phpunit/phpunit": "<=7.5 || >=14" @@ -1434,22 +1434,22 @@ "homepage": "https://www.doctrine-project.org/", "support": { "issues": "https://github.com/doctrine/deprecations/issues", - "source": "https://github.com/doctrine/deprecations/tree/1.1.6" + "source": "https://github.com/doctrine/deprecations/tree/1.2.0" }, - "time": "2026-02-07T07:09:04+00:00" + "time": "2026-11-11T10:04:49+00:00" }, { "name": "ergebnis/agent-detector", - "version": "1.3.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/ergebnis/agent-detector.git", - "reference": "0cd815cec1207873c37624d33f0f2853523152f3" + "reference": "bcc63004284c61c6df6e9625acf2673e3be1889b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ergebnis/agent-detector/zipball/0cd815cec1207873c37624d33f0f2853523152f3", - "reference": "0cd815cec1207873c37624d33f0f2853523152f3", + "url": "https://api.github.com/repos/ergebnis/agent-detector/zipball/bcc63004284c61c6df6e9625acf2673e3be1889b", + "reference": "bcc63004284c61c6df6e9625acf2673e3be1889b", "shasum": "" }, "require": { @@ -1459,8 +1459,8 @@ "ergebnis/composer-normalize": "^2.54.0", "ergebnis/license": "^2.8.0", "ergebnis/php-cs-fixer-config": "^6.60.2", - "ergebnis/phpstan-rules": "^2.14.0", - "ergebnis/phpunit-slow-test-detector": "^2.26.0", + "ergebnis/phpstan-rules": "^2.14.2", + "ergebnis/phpunit-slow-test-detector": "^2.27.0", "ergebnis/rector-rules": "^1.18.5", "fakerphp/faker": "^1.24.1", "infection/infection": "^0.26.6", @@ -1475,7 +1475,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.3-dev" + "dev-main": "2.0-dev" }, "composer-normalize": { "indent-size": 2, @@ -1505,7 +1505,7 @@ "security": "https://github.com/ergebnis/agent-detector/blob/main/.github/SECURITY.md", "source": "https://github.com/ergebnis/agent-detector" }, - "time": "2026-10-15T11:13:32+00:00" + "time": "2026-10-29T17:44:55+00:00" }, { "name": "evenement/evenement", @@ -1674,23 +1674,23 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.95.27", + "version": "v3.95.30", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "1d0c68ee5f37446d8ad5970b82384cd1bb0a3317" + "reference": "e85cafc4d861c122839d5409eda3325ac0ec0300" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/1d0c68ee5f37446d8ad5970b82384cd1bb0a3317", - "reference": "1d0c68ee5f37446d8ad5970b82384cd1bb0a3317", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/e85cafc4d861c122839d5409eda3325ac0ec0300", + "reference": "e85cafc4d861c122839d5409eda3325ac0ec0300", "shasum": "" }, "require": { "clue/ndjson-react": "^1.3", "composer/semver": "^3.4", "composer/xdebug-handler": "^3.0.5", - "ergebnis/agent-detector": "^1.2", + "ergebnis/agent-detector": "^2.0.0", "ext-filter": "*", "ext-hash": "*", "ext-json": "*", @@ -1702,30 +1702,30 @@ "react/socket": "^1.16", "react/stream": "^1.4", "sebastian/diff": "^4.0.6 || ^5.1.1 || ^6.0.2 || ^7.0 || ^8.0 || ^9.0", - "symfony/console": "^5.4.47 || ^6.4.24 || ^7.0 || ^8.0", - "symfony/event-dispatcher": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", - "symfony/filesystem": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", - "symfony/finder": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", - "symfony/options-resolver": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0", - "symfony/polyfill-mbstring": "^1.37", - "symfony/polyfill-php80": "^1.37", - "symfony/polyfill-php81": "^1.37", - "symfony/polyfill-php84": "^1.37", - "symfony/process": "^5.4.47 || ^6.4.24 || ^7.2 || ^8.0", - "symfony/stopwatch": "^5.4.45 || ^6.4.24 || ^7.0 || ^8.0" + "symfony/console": "^5.4.55 || ^6.4.50 || ^7.4.23 || ^8.1.11", + "symfony/event-dispatcher": "^5.4.45 || ^6.4.44 || ^7.4.17 || ^8.1.5", + "symfony/filesystem": "^5.4.56 || ^6.4.50 || ^7.4.23 || ^8.1.11", + "symfony/finder": "^5.4.45 || ^6.4.50 || ^7.4.23 || ^8.1.11", + "symfony/options-resolver": "^5.4.45 || ^6.4.49 || ^7.4.22 || ^8.1.10", + "symfony/polyfill-mbstring": "^1.43.3", + "symfony/polyfill-php80": "^1.43", + "symfony/polyfill-php81": "^1.38.1", + "symfony/polyfill-php84": "^1.43", + "symfony/process": "^5.4.54 || ^6.4.49 || ^7.4.22 || ^8.1.10", + "symfony/stopwatch": "^5.4.45 || ^6.4.24 || ^7.4.8 || ^8.1" }, "require-dev": { "facile-it/paraunit": "^1.3.1 || ^2.11.0", "infection/infection": "^0.32.7", - "justinrainbow/json-schema": "^6.12.0", + "justinrainbow/json-schema": "^6.14.0", "keradus/cli-executor": "^2.3", "php-coveralls/php-coveralls": "^2.9.1", "php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.8", "php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.8", - "phpunit/phpunit": "^9.6.36 || ^10.5.64 || ^11.5.56 || ^12.5.35 || ^13.3.3", - "symfony/polyfill-php85": "^1.41", - "symfony/var-dumper": "^5.4.48 || ^6.4.45 || ^7.4.18 || ^8.1.7", - "symfony/yaml": "^5.4.53 || ^6.4.45 || ^7.4.18 || ^8.1.6" + "phpunit/phpunit": "^9.6.38 || ^10.5.66 || ^11.5.57 || ^12.5.43 || ^13.4.6", + "symfony/polyfill-php85": "^1.43", + "symfony/var-dumper": "^5.4.54 || ^6.4.49 || ^7.4.22 || ^8.1.10", + "symfony/yaml": "^5.4.56 || ^6.4.50 || ^7.4.23 || ^8.1.11" }, "suggest": { "ext-dom": "For handling output formats in XML", @@ -1766,7 +1766,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.95.27" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.95.30" }, "funding": [ { @@ -1774,7 +1774,7 @@ "type": "github" } ], - "time": "2026-09-22T09:54:55+00:00" + "time": "2026-11-09T14:32:19+00:00" }, { "name": "kelunik/certificate", @@ -3140,11 +3140,11 @@ }, { "name": "phpstan/phpstan", - "version": "2.3.4", + "version": "2.3.5", "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/f20ce6f3c82556cfcfc086b152445a12d1d64fff", - "reference": "f20ce6f3c82556cfcfc086b152445a12d1d64fff", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/645a1bd6bead15fc1b8474137467961d0fa30a79", + "reference": "645a1bd6bead15fc1b8474137467961d0fa30a79", "shasum": "" }, "require": { @@ -3200,7 +3200,7 @@ "type": "github" } ], - "time": "2026-10-28T22:38:53+00:00" + "time": "2026-11-03T12:14:22+00:00" }, { "name": "phpunit/php-code-coverage", @@ -3649,6 +3649,325 @@ ], "time": "2026-10-27T04:15:03+00:00" }, + { + "name": "psalm/plugin-laravel", + "version": "v4.19.5", + "source": { + "type": "git", + "url": "https://github.com/psalm/psalm-plugin-laravel.git", + "reference": "f9b54e015ff81be1240bfdc7bf3b4f95e45c3218" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/psalm/psalm-plugin-laravel/zipball/f9b54e015ff81be1240bfdc7bf3b4f95e45c3218", + "reference": "f9b54e015ff81be1240bfdc7bf3b4f95e45c3218", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "nikic/php-parser": "^5.0", + "php": "^8.2", + "psalm/psalm-plugin-api": "^0.4.2", + "sebastian/diff": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0", + "symfony/console": "^6.4 || ^7.0 || ^8.0", + "vimeo/psalm": "^7.3.1@stable" + }, + "conflict": { + "laravel/framework": "<12.27 || 13.0.0 || >=13.1 <13.20", + "orchestra/testbench-core": "<10.0" + }, + "require-dev": { + "alies-dev/psalm-tester": "^0.4", + "brianium/paratest": "^7.7", + "friendsofphp/php-cs-fixer": "^3.94", + "laravel/framework": "^12.27 || ^13.20", + "orchestra/testbench-core": "^10.0 || ^11.0", + "phpunit/phpunit": "^11.5 || ^12.5 || ^13.0", + "ramsey/collection": "^1.3", + "rector/rector": "^2.8.3", + "symfony/http-foundation": "^7.1 || ^8.0", + "symfony/process": "^7.1 || ^8.0" + }, + "bin": [ + "bin/psalm-laravel" + ], + "type": "psalm-plugin", + "extra": { + "psalm": { + "pluginClass": "Psalm\\LaravelPlugin\\Plugin" + } + }, + "autoload": { + "psr-4": { + "Psalm\\LaravelPlugin\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matthew Brown", + "email": "github@muglug.com", + "role": "Original Author" + }, + { + "name": "Alies Lapatsin", + "email": "github@alies.dev", + "role": "Maintainer" + } + ], + "description": "Psalm plugin for Laravel", + "homepage": "https://github.com/psalm/psalm-plugin-laravel", + "keywords": [ + "dev", + "laravel", + "psalm", + "psalm-plugin" + ], + "support": { + "issues": "https://github.com/psalm/psalm-plugin-laravel/issues", + "source": "https://github.com/psalm/psalm-plugin-laravel/tree/v4.19.5" + }, + "funding": [ + { + "url": "https://github.com/alies-dev", + "type": "github" + } + ], + "time": "2026-11-13T00:15:12+00:00" + }, + { + "name": "psalm/plugin-mockery", + "version": "1.3.2", + "source": { + "type": "git", + "url": "https://github.com/psalm/psalm-plugin-mockery.git", + "reference": "ddff47dd095dc3c47224a3f6bf137e28570ef022" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/psalm/psalm-plugin-mockery/zipball/ddff47dd095dc3c47224a3f6bf137e28570ef022", + "reference": "ddff47dd095dc3c47224a3f6bf137e28570ef022", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.0", + "composer/semver": "^1.4 || ^2.0 || ^3.0", + "php": ">=8.1", + "psalm/psalm-plugin-api": "^0.4", + "vimeo/psalm": "^7|dev-master" + }, + "conflict": { + "mockery/mockery": "<1.0" + }, + "require-dev": { + "codeception/codeception": "^5.0", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^10.5 || ^11.5 || ^12.0 || ^13.0", + "squizlabs/php_codesniffer": "^3.3.1", + "weirdan/codeception-psalm-module": "^0.14.1" + }, + "type": "psalm-plugin", + "extra": { + "psalm": { + "pluginClass": "Psalm\\MockeryPlugin\\Plugin" + } + }, + "autoload": { + "psr-4": { + "Psalm\\MockeryPlugin\\": [ + "." + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matt Brown", + "email": "github@muglug.com" + } + ], + "description": "Psalm plugin for Mockery", + "support": { + "issues": "https://github.com/psalm/psalm-plugin-mockery/issues", + "source": "https://github.com/psalm/psalm-plugin-mockery/tree/1.3.2" + }, + "time": "2026-10-28T12:21:43+00:00" + }, + { + "name": "psalm/plugin-phpunit", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/psalm/psalm-plugin-phpunit.git", + "reference": "9227f2ac5d7ec16d1f4c9904a4326397b90d5566" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/psalm/psalm-plugin-phpunit/zipball/9227f2ac5d7ec16d1f4c9904a4326397b90d5566", + "reference": "9227f2ac5d7ec16d1f4c9904a4326397b90d5566", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "php": ">=8.2", + "psalm/psalm-plugin-api": "^0.4.2", + "vimeo/psalm": "^7.2 || dev-master" + }, + "conflict": { + "phpspec/prophecy": "<1.20.0", + "phpspec/prophecy-phpunit": "<2.3.0", + "phpunit/phpunit": "<11.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^3.88", + "phpspec/prophecy-phpunit": "^2.5", + "phpunit/phpunit": "^11.0 || ^12.0 || ^13.0" + }, + "type": "psalm-plugin", + "extra": { + "psalm": { + "pluginClass": "Psalm\\PhpUnitPlugin\\Plugin" + }, + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psalm\\PhpUnitPlugin\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Matt Brown", + "email": "github@muglug.com" + } + ], + "description": "Psalm plugin for PHPUnit", + "support": { + "issues": "https://github.com/psalm/psalm-plugin-phpunit/issues", + "source": "https://github.com/psalm/psalm-plugin-phpunit/tree/1.2.0" + }, + "time": "2026-11-14T00:23:20+00:00" + }, + { + "name": "psalm/plugin-symfony", + "version": "v5.11.0", + "source": { + "type": "git", + "url": "https://github.com/psalm/psalm-plugin-symfony.git", + "reference": "1fef73d616f0e187ffc05d13dd98f10ade6bc9e0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/psalm/psalm-plugin-symfony/zipball/1fef73d616f0e187ffc05d13dd98f10ade6bc9e0", + "reference": "1fef73d616f0e187ffc05d13dd98f10ade6bc9e0", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "php": ">=8.2", + "psalm/psalm-plugin-api": "^0.4.2", + "vimeo/psalm": "^7.0@stable|dev-master" + }, + "conflict": { + "fidry/cpu-core-counter": "<1.2", + "symfony/expression-language": "<5.0", + "symfony/framework-bundle": "<5.0" + }, + "require-dev": { + "doctrine/annotations": "^1.8|^2", + "doctrine/orm": "^2.9 || ^3.6", + "phpunit/phpunit": "~7.5 || ~9.5", + "symfony/cache-contracts": "^1.0 || ^2.0 || ^3.0", + "symfony/console": "*", + "symfony/expression-language": "^5.0 || ^6.0 || ^7.0 || ^8.0", + "symfony/form": "^5.0 || ^6.0 || ^7.0 || ^8.0", + "symfony/framework-bundle": "^5.0 || ^6.0 || ^7.0 || ^8.0", + "symfony/messenger": "^5.0 || ^6.0 || ^7.0 || ^8.0", + "symfony/mime": "^5.0 || ^6.0 || ^7.0 || ^8.0", + "symfony/security-core": "*", + "symfony/serializer": "^5.0 || ^6.0 || ^7.0 || ^8.0", + "symfony/validator": "*", + "twig/twig": "^2.10 || ^3.0", + "weirdan/codeception-psalm-module": "dev-master" + }, + "suggest": { + "weirdan/doctrine-psalm-plugin": "If Doctrine is used, it is recommended install this plugin" + }, + "type": "psalm-plugin", + "extra": { + "psalm": { + "pluginClass": "Psalm\\SymfonyPsalmPlugin\\Plugin" + } + }, + "autoload": { + "psr-4": { + "Psalm\\SymfonyPsalmPlugin\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Farhad Safarov", + "email": "farhad.safarov@gmail.com" + } + ], + "description": "Psalm Plugin for Symfony", + "support": { + "issues": "https://github.com/psalm/psalm-plugin-symfony/issues", + "source": "https://github.com/psalm/psalm-plugin-symfony/tree/v5.11.0" + }, + "time": "2026-11-11T11:34:54+00:00" + }, + { + "name": "psalm/psalm-plugin-api", + "version": "0.4.3", + "source": { + "type": "git", + "url": "https://github.com/psalm/psalm-plugin-api.git", + "reference": "1d4369adfe959d6459f10f647d386051e93e8e2e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/psalm/psalm-plugin-api/zipball/1d4369adfe959d6459f10f647d386051e93e8e2e", + "reference": "1d4369adfe959d6459f10f647d386051e93e8e2e", + "shasum": "" + }, + "conflict": { + "vimeo/psalm": "<7.0.0-rc3" + }, + "type": "metapackage", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Daniil Gentili", + "email": "daniil@daniil.it" + } + ], + "description": "Stable, semantically versioned API for Psalm plugins", + "support": { + "issues": "https://github.com/psalm/psalm-plugin-api/issues", + "source": "https://github.com/psalm/psalm-plugin-api/tree/0.4.3" + }, + "time": "2026-11-13T22:58:21+00:00" + }, { "name": "psr/container", "version": "2.0.2", @@ -4438,21 +4757,21 @@ }, { "name": "rector/rector", - "version": "2.8.3", + "version": "2.8.4", "source": { "type": "git", "url": "https://github.com/rectorphp/rector.git", - "reference": "12ddb68d34acb91bcf3d00302bf1c7c1b5840bd6" + "reference": "55acbd956d7e3907f7d21aab54edd68a310609e6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/rectorphp/rector/zipball/12ddb68d34acb91bcf3d00302bf1c7c1b5840bd6", - "reference": "12ddb68d34acb91bcf3d00302bf1c7c1b5840bd6", + "url": "https://api.github.com/repos/rectorphp/rector/zipball/55acbd956d7e3907f7d21aab54edd68a310609e6", + "reference": "55acbd956d7e3907f7d21aab54edd68a310609e6", "shasum": "" }, "require": { "php": "^7.4|^8.0", - "phpstan/phpstan": "^2.3.4" + "phpstan/phpstan": "^2.3.5" }, "conflict": { "rector/rector-doctrine": "*", @@ -4483,7 +4802,7 @@ ], "support": { "issues": "https://github.com/rectorphp/rector/issues", - "source": "https://github.com/rectorphp/rector/tree/2.8.3" + "source": "https://github.com/rectorphp/rector/tree/2.8.4" }, "funding": [ { @@ -4491,7 +4810,7 @@ "type": "github" } ], - "time": "2026-10-29T05:51:41+00:00" + "time": "2026-11-03T18:48:08+00:00" }, { "name": "revolt/event-loop", @@ -5434,16 +5753,16 @@ }, { "name": "sebastian/version", - "version": "6.0.1", + "version": "6.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "9e935a16187e14f39b0e79910dabd614972cdb26" + "reference": "a8b6643a19ba6c8125a473623e45fb8cbb0e4159" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/9e935a16187e14f39b0e79910dabd614972cdb26", - "reference": "9e935a16187e14f39b0e79910dabd614972cdb26", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/a8b6643a19ba6c8125a473623e45fb8cbb0e4159", + "reference": "a8b6643a19ba6c8125a473623e45fb8cbb0e4159", "shasum": "" }, "require": { @@ -5476,7 +5795,7 @@ "support": { "issues": "https://github.com/sebastianbergmann/version/issues", "security": "https://github.com/sebastianbergmann/version/security/policy", - "source": "https://github.com/sebastianbergmann/version/tree/6.0.1" + "source": "https://github.com/sebastianbergmann/version/tree/6.0.2" }, "funding": [ { @@ -5496,7 +5815,7 @@ "type": "tidelift" } ], - "time": "2026-10-04T05:50:08+00:00" + "time": "2026-11-09T06:30:55+00:00" }, { "name": "sirbrillig/phpcs-variable-analysis", @@ -7619,22 +7938,22 @@ }, { "name": "vimeo/psalm", - "version": "6.20.5", + "version": "7.5.0", "source": { "type": "git", "url": "https://github.com/vimeo/psalm.git", - "reference": "e447b655502f2058630e6ee03f2ea1c3789fe166" + "reference": "9520421041c4de67379270dc17502544dd808140" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vimeo/psalm/zipball/e447b655502f2058630e6ee03f2ea1c3789fe166", - "reference": "e447b655502f2058630e6ee03f2ea1c3789fe166", + "url": "https://api.github.com/repos/vimeo/psalm/zipball/9520421041c4de67379270dc17502544dd808140", + "reference": "9520421041c4de67379270dc17502544dd808140", "shasum": "" }, "require": { "amphp/amp": "^3", "amphp/byte-stream": "^2", - "amphp/parallel": "^2.3", + "amphp/parallel": "^2.4.0", "composer-runtime-api": "^2", "composer/semver": "^1.4 || ^2.0 || ^3.0", "composer/xdebug-handler": "^2.0 || ^3.0", @@ -7648,10 +7967,15 @@ "ext-simplexml": "*", "ext-tokenizer": "*", "felixfbecker/language-server-protocol": "^1.5.3", - "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1 || ^1.0.0", + "fidry/cpu-core-counter": "^1.2", "netresearch/jsonmapper": "^5.0", - "nikic/php-parser": "^5.2.0", - "php": "~8.1.31 || ~8.2.27 || ~8.3.16 || ~8.4.3 || ~8.5.0", + "nikic/php-parser": "^5.9", + "php-64bit": "~8.2.27 || ~8.3.16 || ~8.4.3 || ~8.5.0 || ~8.6.0", + "psalm/plugin-laravel": "^4.17.4", + "psalm/plugin-mockery": "^1.3.2", + "psalm/plugin-phpunit": "^0.21 || ^0.22 || ^1.0", + "psalm/plugin-symfony": "^5.9.1", + "psalm/psalm-plugin-api": "0.4.3", "sebastian/diff": "^4.0 || ^5.0 || ^6.0 || ^7.0 || ^8.0 || ^9.0", "spatie/array-to-xml": "^2.17.0 || ^3.0", "symfony/console": "^6.0 || ^7.0 || ^8.0", @@ -7662,9 +7986,8 @@ "psalm/psalm": "self.version" }, "require-dev": { - "amphp/phpunit-util": "^3", "bamarni/composer-bin-plugin": "^1.4", - "brianium/paratest": "^6.9", + "brianium/paratest": "^7.3", "danog/class-finder": "^0.4.8", "dg/bypass-finals": "^1.5", "ext-curl": "*", @@ -7672,16 +7995,15 @@ "nunomaduro/mock-final-classes": "^1.1", "php-parallel-lint/php-parallel-lint": "^1.2", "phpstan/phpdoc-parser": "^1.6", - "phpunit/phpunit": "^9.6", - "psalm/plugin-mockery": "^1.1", - "psalm/plugin-phpunit": "^0.19", + "phpunit/phpunit": "^10.5 || ^11.5 || ^12.5 || ^13.0", "slevomat/coding-standard": "^8.4", "squizlabs/php_codesniffer": "^3.6", "symfony/process": "^6.0 || ^7.0 || ^8.0" }, "suggest": { "ext-curl": "In order to send data to shepherd", - "ext-igbinary": "^2.0.5 is required, used to serialize caching data" + "ext-igbinary": "^2.0.5 is required, used to serialize caching data", + "ext-zstd": ">=0.15.0 is required, used to compress caching data" }, "bin": [ "psalm", @@ -7733,7 +8055,7 @@ "issues": "https://github.com/vimeo/psalm/issues", "source": "https://github.com/vimeo/psalm" }, - "time": "2026-10-31T16:01:17+00:00" + "time": "2026-11-14T00:41:11+00:00" }, { "name": "webmozart/assert", diff --git a/includes/admin-page.php b/includes/admin-page.php index 937e227..4272b58 100644 --- a/includes/admin-page.php +++ b/includes/admin-page.php @@ -6,6 +6,12 @@ */ // Prevent direct execution of this component. +/** + * Psalm 7.5 reads this guard as already decided by the main plugin file's own check; + * it still stops a direct request to this file. + * + * @psalm-suppress RedundantCondition, ParadoxicalCondition + */ if ( ! defined( 'ABSPATH' ) ) { return; } diff --git a/includes/archive.php b/includes/archive.php index 54c89b2..02a54af 100644 --- a/includes/archive.php +++ b/includes/archive.php @@ -6,6 +6,12 @@ */ // Prevent direct execution of this component. +/** + * Psalm 7.5 reads this guard as already decided by the main plugin file's own check; + * it still stops a direct request to this file. + * + * @psalm-suppress RedundantCondition, ParadoxicalCondition + */ if ( ! defined( 'ABSPATH' ) ) { return; } diff --git a/includes/cleanup.php b/includes/cleanup.php index a2303e5..5164d78 100644 --- a/includes/cleanup.php +++ b/includes/cleanup.php @@ -6,6 +6,12 @@ */ // Prevent direct execution of this component. +/** + * Psalm 7.5 reads this guard as already decided by the main plugin file's own check; + * it still stops a direct request to this file. + * + * @psalm-suppress RedundantCondition, ParadoxicalCondition + */ if ( ! defined( 'ABSPATH' ) ) { return; } @@ -294,13 +300,10 @@ function esse_uninstall_plugin(): void { ) ); - foreach ( $site_ids as $site_id ) { - if ( ! is_numeric( $site_id ) ) { - continue; - } - + // Only numeric IDs, as integers. + foreach ( array_map( intval( ... ), array_filter( $site_ids, is_numeric( ... ) ) ) as $site_id ) { // phpcs:ignore WordPressVIPMinimum.Functions.RestrictedFunctions.switch_to_blog_switch_to_blog -- Only the site's options and cron entries are removed; no code of that site has to load. - switch_to_blog( (int) $site_id ); + switch_to_blog( $site_id ); delete_option( 'sse_error_logs' ); foreach ( esse_get_scheduled_hook_names() as $hook ) { wp_unschedule_hook( $hook ); diff --git a/includes/download.php b/includes/download.php index 6d82034..0f5f574 100644 --- a/includes/download.php +++ b/includes/download.php @@ -6,6 +6,12 @@ */ // Prevent direct execution of this component. +/** + * Psalm 7.5 reads this guard as already decided by the main plugin file's own check; + * it still stops a direct request to this file. + * + * @psalm-suppress RedundantCondition, ParadoxicalCondition + */ if ( ! defined( 'ABSPATH' ) ) { return; } @@ -17,8 +23,8 @@ */ function esse_handle_secure_download(): void { // The values are only unslashed and cleaned here. The anchored name patterns and the resolved-path check below are the control. - $filename = isset( $_GET['file'] ) && is_string( $_GET['file'] ) ? sanitize_text_field( (string) wp_unslash( $_GET['file'] ) ) : ''; - $export_dir_name = isset( $_GET['export_dir'] ) && is_string( $_GET['export_dir'] ) ? sanitize_text_field( (string) wp_unslash( $_GET['export_dir'] ) ) : ''; + $filename = isset( $_GET['file'] ) && is_string( $_GET['file'] ) ? sanitize_text_field( wp_unslash( $_GET['file'] ) ) : ''; + $export_dir_name = isset( $_GET['export_dir'] ) && is_string( $_GET['export_dir'] ) ? sanitize_text_field( wp_unslash( $_GET['export_dir'] ) ) : ''; if ( '' === $filename || '' === $export_dir_name ) { esse_wp_die( __( 'Invalid download request.', 'enginescript-site-exporter' ), 400 ); } @@ -54,8 +60,8 @@ function esse_handle_secure_download(): void { */ function esse_handle_export_deletion(): void { // The values are only unslashed and cleaned here. The anchored name patterns and the resolved-path check below are the control. - $filename = isset( $_POST['file'] ) && is_string( $_POST['file'] ) ? sanitize_text_field( (string) wp_unslash( $_POST['file'] ) ) : ''; - $export_dir_name = isset( $_POST['export_dir'] ) && is_string( $_POST['export_dir'] ) ? sanitize_text_field( (string) wp_unslash( $_POST['export_dir'] ) ) : ''; + $filename = isset( $_POST['file'] ) && is_string( $_POST['file'] ) ? sanitize_text_field( wp_unslash( $_POST['file'] ) ) : ''; + $export_dir_name = isset( $_POST['export_dir'] ) && is_string( $_POST['export_dir'] ) ? sanitize_text_field( wp_unslash( $_POST['export_dir'] ) ) : ''; if ( '' === $filename || '' === $export_dir_name ) { esse_wp_die( __( 'Invalid deletion request.', 'enginescript-site-exporter' ), 400 ); } diff --git a/includes/export.php b/includes/export.php index e1c4d10..6f6d3df 100644 --- a/includes/export.php +++ b/includes/export.php @@ -6,6 +6,12 @@ */ // Prevent direct execution of this component. +/** + * Psalm 7.5 reads this guard as already decided by the main plugin file's own check; + * it still stops a direct request to this file. + * + * @psalm-suppress RedundantCondition, ParadoxicalCondition + */ if ( ! defined( 'ABSPATH' ) ) { return; } @@ -658,7 +664,7 @@ function esse_validate_exported_database_file( array $database_file ): true|WP_E * @return int|false Selected per-file size limit in bytes when the request is valid, false otherwise. */ function esse_validate_export_request(): int|false { - $post_action = isset( $_POST['action'] ) && is_string( $_POST['action'] ) ? sanitize_key( (string) wp_unslash( $_POST['action'] ) ) : ''; + $post_action = isset( $_POST['action'] ) && is_string( $_POST['action'] ) ? sanitize_key( wp_unslash( $_POST['action'] ) ) : ''; if ( 'sse_export_site' !== $post_action ) { return false; } @@ -670,7 +676,7 @@ function esse_validate_export_request(): int|false { } // Accept only a size that the form offers; anything else means no limit. - $requested_size = isset( $_POST['sse_max_file_size'] ) && is_string( $_POST['sse_max_file_size'] ) ? sanitize_text_field( (string) wp_unslash( $_POST['sse_max_file_size'] ) ) : ''; + $requested_size = isset( $_POST['sse_max_file_size'] ) && is_string( $_POST['sse_max_file_size'] ) ? sanitize_text_field( wp_unslash( $_POST['sse_max_file_size'] ) ) : ''; foreach ( array_keys( esse_get_export_file_size_options() ) as $offered_size ) { if ( (string) $offered_size === $requested_size ) { return $offered_size; diff --git a/includes/helpers.php b/includes/helpers.php index 00a0e47..fe96fcc 100644 --- a/includes/helpers.php +++ b/includes/helpers.php @@ -6,6 +6,12 @@ */ // Prevent direct execution of this component. +/** + * Psalm 7.5 reads this guard as already decided by the main plugin file's own check; + * it still stops a direct request to this file. + * + * @psalm-suppress RedundantCondition, ParadoxicalCondition + */ if ( ! defined( 'ABSPATH' ) ) { return; } diff --git a/includes/lease.php b/includes/lease.php index f2bf037..8a49c53 100644 --- a/includes/lease.php +++ b/includes/lease.php @@ -10,6 +10,12 @@ */ // Prevent direct execution of this component. +/** + * Psalm 7.5 reads this guard as already decided by the main plugin file's own check; + * it still stops a direct request to this file. + * + * @psalm-suppress RedundantCondition, ParadoxicalCondition + */ if ( ! defined( 'ABSPATH' ) ) { return; } diff --git a/includes/process.php b/includes/process.php index fe14304..bf45f4f 100644 --- a/includes/process.php +++ b/includes/process.php @@ -9,6 +9,12 @@ */ // Prevent direct execution of this component. +/** + * Psalm 7.5 reads this guard as already decided by the main plugin file's own check; + * it still stops a direct request to this file. + * + * @psalm-suppress RedundantCondition, ParadoxicalCondition + */ if ( ! defined( 'ABSPATH' ) ) { return; } diff --git a/includes/security.php b/includes/security.php index 03fcaff..dc1ec8e 100644 --- a/includes/security.php +++ b/includes/security.php @@ -6,6 +6,12 @@ */ // Prevent direct execution of this component. +/** + * Psalm 7.5 reads this guard as already decided by the main plugin file's own check; + * it still stops a direct request to this file. + * + * @psalm-suppress RedundantCondition, ParadoxicalCondition + */ if ( ! defined( 'ABSPATH' ) ) { return; } diff --git a/includes/tar.php b/includes/tar.php index 78c5424..5e56118 100644 --- a/includes/tar.php +++ b/includes/tar.php @@ -11,6 +11,12 @@ */ // Prevent direct execution of this component. +/** + * Psalm 7.5 reads this guard as already decided by the main plugin file's own check; + * it still stops a direct request to this file. + * + * @psalm-suppress RedundantCondition, ParadoxicalCondition + */ if ( ! defined( 'ABSPATH' ) ) { return; } diff --git a/languages/enginescript-site-exporter.pot b/languages/enginescript-site-exporter.pot index bb32652..c510b06 100644 --- a/languages/enginescript-site-exporter.pot +++ b/languages/enginescript-site-exporter.pot @@ -9,15 +9,15 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2026-11-07T01:11:27+00:00\n" +"POT-Creation-Date: 2026-11-14T08:40:53+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "X-Generator: WP-CLI 2.12.0\n" "X-Domain: enginescript-site-exporter\n" #. Plugin Name of the plugin #: enginescript-site-exporter.php -#: includes/admin-page.php:49 -#: includes/admin-page.php:70 +#: includes/admin-page.php:55 +#: includes/admin-page.php:76 msgid "EngineScript Site Exporter" msgstr "" @@ -31,21 +31,21 @@ msgstr "" msgid "EngineScript" msgstr "" -#: includes/admin-page.php:50 -#: includes/admin-page.php:71 +#: includes/admin-page.php:56 +#: includes/admin-page.php:77 msgid "Site Exporter" msgstr "" -#: includes/admin-page.php:175 +#: includes/admin-page.php:181 msgid "Site export successfully created!" msgstr "" -#: includes/admin-page.php:179 +#: includes/admin-page.php:185 msgid "Download it from the list of available exports on this page." msgstr "" #. translators: %s: number of files or directories -#: includes/admin-page.php:204 +#: includes/admin-page.php:210 #, php-format msgid "%s unreadable file or directory" msgid_plural "%s unreadable files or directories" @@ -53,7 +53,7 @@ msgstr[0] "" msgstr[1] "" #. translators: %s: number of symbolic links -#: includes/admin-page.php:208 +#: includes/admin-page.php:214 #, php-format msgid "%s symbolic link" msgid_plural "%s symbolic links" @@ -61,7 +61,7 @@ msgstr[0] "" msgstr[1] "" #. translators: %s: number of special files -#: includes/admin-page.php:212 +#: includes/admin-page.php:218 #, php-format msgid "%s special file such as a socket or named pipe" msgid_plural "%s special files such as sockets or named pipes" @@ -69,7 +69,7 @@ msgstr[0] "" msgstr[1] "" #. translators: %s: number of files -#: includes/admin-page.php:216 +#: includes/admin-page.php:222 #, php-format msgid "%s file over the size limit" msgid_plural "%s files over the size limit" @@ -77,12 +77,12 @@ msgstr[0] "" msgstr[1] "" #. translators: %l: list of counted entries, for example "2 symbolic links and 1 file over the size limit" -#: includes/admin-page.php:222 +#: includes/admin-page.php:228 msgid "Left out of the export: %l." msgstr "" #. translators: %s: number of files -#: includes/admin-page.php:226 +#: includes/admin-page.php:232 #, php-format msgid "%s file changed while it was read and may be incomplete in the export." msgid_plural "%s files changed while they were read and may be incomplete in the export." @@ -90,578 +90,578 @@ msgstr[0] "" msgstr[1] "" #. translators: %s: archive file name -#: includes/admin-page.php:297 +#: includes/admin-page.php:303 #, php-format msgid "Download %s" msgstr "" #. translators: %s: archive file name -#: includes/admin-page.php:299 +#: includes/admin-page.php:305 #, php-format msgid "Delete %s" msgstr "" -#: includes/admin-page.php:303 +#: includes/admin-page.php:309 msgid "Download Export File" msgstr "" -#: includes/admin-page.php:309 +#: includes/admin-page.php:315 msgid "Are you sure you want to delete this export file?" msgstr "" -#: includes/admin-page.php:316 +#: includes/admin-page.php:322 msgid "Delete Export File" msgstr "" -#: includes/admin-page.php:332 +#: includes/admin-page.php:338 msgid "Available exports" msgstr "" -#: includes/admin-page.php:334 +#: includes/admin-page.php:340 msgid "No exports are available. A finished export is listed here until it is deleted." msgstr "" -#: includes/admin-page.php:337 +#: includes/admin-page.php:343 msgid "Exports that can be downloaded or deleted" msgstr "" -#: includes/admin-page.php:340 +#: includes/admin-page.php:346 msgid "File" msgstr "" -#: includes/admin-page.php:341 +#: includes/admin-page.php:347 msgid "Size" msgstr "" -#: includes/admin-page.php:342 +#: includes/admin-page.php:348 msgid "Created" msgstr "" -#: includes/admin-page.php:343 +#: includes/admin-page.php:349 msgid "Actions" msgstr "" -#: includes/admin-page.php:370 +#: includes/admin-page.php:376 msgid "System" msgstr "" #. translators: %d: user ID -#: includes/admin-page.php:379 +#: includes/admin-page.php:385 #, php-format msgid "User %d (no longer exists)" msgstr "" -#: includes/admin-page.php:391 +#: includes/admin-page.php:397 msgid "Activity" msgstr "" -#: includes/admin-page.php:392 +#: includes/admin-page.php:398 msgid "Error" msgstr "" -#: includes/admin-page.php:393 +#: includes/admin-page.php:399 msgid "Security" msgstr "" -#: includes/admin-page.php:408 +#: includes/admin-page.php:414 msgid "Recent activity" msgstr "" -#: includes/admin-page.php:409 +#: includes/admin-page.php:415 msgid "Up to 20 exports, downloads, deletions, errors, and security events from the last seven days, newest first." msgstr "" -#: includes/admin-page.php:411 +#: includes/admin-page.php:417 msgid "No activity has been recorded." msgstr "" -#: includes/admin-page.php:414 +#: includes/admin-page.php:420 msgid "Recent exporter activity" msgstr "" -#: includes/admin-page.php:417 +#: includes/admin-page.php:423 msgid "Time" msgstr "" -#: includes/admin-page.php:418 +#: includes/admin-page.php:424 msgid "User" msgstr "" -#: includes/admin-page.php:419 +#: includes/admin-page.php:425 msgid "Type" msgstr "" -#: includes/admin-page.php:420 +#: includes/admin-page.php:426 msgid "Details" msgstr "" -#: includes/admin-page.php:449 +#: includes/admin-page.php:455 msgid "This page is not served over HTTPS. A downloaded export travels unencrypted, and it contains the whole database and wp-config.php." msgstr "" -#: includes/admin-page.php:471 +#: includes/admin-page.php:477 msgid "You can still create the export, and it remains a complete backup. Importing it with EngineScript will stop until this is corrected." msgstr "" -#: includes/admin-page.php:507 +#: includes/admin-page.php:513 msgid "You do not have permission to view this page." msgstr "" -#: includes/admin-page.php:525 +#: includes/admin-page.php:531 msgid "Create an export" msgstr "" -#: includes/admin-page.php:530 +#: includes/admin-page.php:536 msgid "Click the button below to generate an EngineScript-compatible site archive containing your WordPress files and the database." msgstr "" -#: includes/admin-page.php:531 +#: includes/admin-page.php:537 msgid "Warning:" msgstr "" -#: includes/admin-page.php:531 +#: includes/admin-page.php:537 msgid "This can take a long time and consume significant server resources, especially on large sites. Ensure your server has sufficient disk space and execution time." msgstr "" #. translators: %s: directory path. -#: includes/admin-page.php:537 +#: includes/admin-page.php:543 #, php-format msgid "Exports are stored in this private server directory: %s" msgstr "" -#: includes/admin-page.php:546 +#: includes/admin-page.php:552 msgid "The export is running. This can take several minutes. Keep this page open; it reloads when the export has finished." msgstr "" -#: includes/admin-page.php:555 +#: includes/admin-page.php:561 msgid "Maximum File Size" msgstr "" -#: includes/admin-page.php:564 +#: includes/admin-page.php:570 msgid "Files larger than this size are excluded. \"No per-file limit\" removes this size filter, but other exclusions and overall export limits still apply." msgstr "" -#: includes/admin-page.php:571 +#: includes/admin-page.php:577 msgid "Export Site" msgstr "" -#: includes/admin-page.php:578 +#: includes/admin-page.php:584 msgid "This plugin is part of the EngineScript project." msgstr "" -#: includes/admin-page.php:580 +#: includes/admin-page.php:586 msgid "Visit the EngineScript GitHub page" msgstr "" -#: includes/admin-page.php:581 +#: includes/admin-page.php:587 msgid "(opens in a new tab)" msgstr "" -#: includes/admin-page.php:585 +#: includes/admin-page.php:591 msgid "Security Notice:" msgstr "" -#: includes/admin-page.php:586 +#: includes/admin-page.php:592 msgid "An export contains the whole site: its files and its database, including password hashes and wp-config.php. Only administrators who can open this page can create or download one. Each export is scheduled for deletion 5 minutes after it is created. Deletion can be delayed if WordPress cron does not run, so download the export promptly and delete it when you are finished." msgstr "" -#: includes/archive.php:116 +#: includes/archive.php:122 msgid "Your server does not provide ZipArchive. Enable the PHP ZIP extension to create an export." msgstr "" -#: includes/archive.php:120 +#: includes/archive.php:126 msgid "Your server does not provide gzip support. Enable the PHP zlib extension to create an export." msgstr "" -#: includes/archive.php:125 +#: includes/archive.php:131 msgid "Your server has disabled the PHP disk_free_space() function. Enable it to create an export." msgstr "" -#: includes/archive.php:140 +#: includes/archive.php:146 msgid "Exports require a 64-bit PHP runtime." msgstr "" -#: includes/archive.php:247 +#: includes/archive.php:253 msgid "Could not create the staging directories for the export." msgstr "" -#: includes/archive.php:262 +#: includes/archive.php:268 msgid "Could not verify the size of the generated export." msgstr "" -#: includes/archive.php:278 -#: includes/archive.php:300 -#: includes/archive.php:326 -#: includes/export.php:321 -#: includes/export.php:386 +#: includes/archive.php:284 +#: includes/archive.php:306 +#: includes/archive.php:332 +#: includes/export.php:327 +#: includes/export.php:392 msgid "The generated export exceeds the configured aggregate size limit." msgstr "" -#: includes/archive.php:350 +#: includes/archive.php:356 msgid "Could not compress the database dump." msgstr "" -#: includes/archive.php:379 +#: includes/archive.php:385 msgid "Could not open the database dump for compression." msgstr "" -#: includes/archive.php:386 +#: includes/archive.php:392 msgid "Could not create the compressed database file." msgstr "" -#: includes/archive.php:399 +#: includes/archive.php:405 msgid "The compressed database file was not created." msgstr "" -#: includes/archive.php:404 +#: includes/archive.php:410 msgid "Could not secure the permissions of the compressed database file." msgstr "" -#: includes/archive.php:437 -#: includes/archive.php:452 -#: includes/archive.php:850 +#: includes/archive.php:443 +#: includes/archive.php:458 +#: includes/archive.php:856 msgid "The WordPress files archive was not created." msgstr "" -#: includes/archive.php:443 -#: includes/archive.php:457 +#: includes/archive.php:449 +#: includes/archive.php:463 msgid "Could not secure the permissions of the files archive." msgstr "" -#: includes/archive.php:500 +#: includes/archive.php:506 msgid "Could not write the EngineScript export manifest." msgstr "" -#: includes/archive.php:504 +#: includes/archive.php:510 msgid "Could not secure the permissions of the EngineScript export manifest." msgstr "" -#: includes/archive.php:583 -#: includes/archive.php:586 +#: includes/archive.php:589 +#: includes/archive.php:592 msgid "Could not add the EngineScript directories to the ZIP archive." msgstr "" -#: includes/archive.php:596 +#: includes/archive.php:602 msgid "Could not add an EngineScript payload file to the ZIP archive." msgstr "" -#: includes/archive.php:600 +#: includes/archive.php:606 msgid "Could not store an EngineScript payload file in the ZIP archive without recompression." msgstr "" -#: includes/archive.php:647 +#: includes/archive.php:653 msgid "Could not finalize or save the ZIP archive." msgstr "" -#: includes/archive.php:652 +#: includes/archive.php:658 msgid "Could not secure the permissions of the ZIP archive." msgstr "" #. translators: %s: ZIP file name. -#: includes/archive.php:691 +#: includes/archive.php:697 #, php-format msgid "Could not create the ZIP file %s." msgstr "" #. translators: %s: error message -#: includes/archive.php:843 +#: includes/archive.php:849 #, php-format msgid "The files archive could not be completed: %s" msgstr "" #. translators: %s: file path -#: includes/archive.php:1195 +#: includes/archive.php:1201 #, php-format msgid "Could not add a file to the archive: %s" msgstr "" -#: includes/cleanup.php:99 +#: includes/cleanup.php:105 msgid "The recovery of an interrupted export could not be scheduled, so the export was not started." msgstr "" -#: includes/download.php:23 +#: includes/download.php:29 msgid "Invalid download request." msgstr "" -#: includes/download.php:32 +#: includes/download.php:38 msgid "You do not have permission to download export files." msgstr "" -#: includes/download.php:44 +#: includes/download.php:50 msgid "You can download one export per minute. Please wait before trying again." msgstr "" -#: includes/download.php:60 +#: includes/download.php:66 msgid "Invalid deletion request." msgstr "" -#: includes/download.php:69 +#: includes/download.php:75 msgid "You do not have permission to delete export files." msgstr "" -#: includes/download.php:85 +#: includes/download.php:91 msgid "Export file successfully deleted." msgstr "" -#: includes/download.php:95 +#: includes/download.php:101 msgid "Could not delete the export file." msgstr "" -#: includes/download.php:166 +#: includes/download.php:172 msgid "Access denied: invalid file type." msgstr "" -#: includes/download.php:180 +#: includes/download.php:186 msgid "Access denied." msgstr "" -#: includes/download.php:216 -#: includes/download.php:259 -#: includes/download.php:264 -#: includes/download.php:269 +#: includes/download.php:222 +#: includes/download.php:265 +#: includes/download.php:270 +#: includes/download.php:275 msgid "Could not serve the file download." msgstr "" -#: includes/download.php:223 -#: includes/download.php:239 +#: includes/download.php:229 +#: includes/download.php:245 msgid "The export file changed before the download and was not served." msgstr "" -#: includes/export.php:34 +#: includes/export.php:40 msgid "No per-file limit" msgstr "" -#: includes/export.php:35 +#: includes/export.php:41 msgid "100 MiB" msgstr "" -#: includes/export.php:36 +#: includes/export.php:42 msgid "500 MiB" msgstr "" -#: includes/export.php:37 +#: includes/export.php:43 msgid "1 GiB" msgstr "" -#: includes/export.php:290 -#: includes/export.php:375 -#: includes/export.php:403 -#: includes/export.php:434 +#: includes/export.php:296 +#: includes/export.php:381 +#: includes/export.php:409 +#: includes/export.php:440 msgid "The resource accounting of the export was not initialized." msgstr "" -#: includes/export.php:296 +#: includes/export.php:302 msgid "The export exceeded its configured processing time limit." msgstr "" -#: includes/export.php:352 +#: includes/export.php:358 msgid "The export stopped because its working directory was removed." msgstr "" -#: includes/export.php:358 +#: includes/export.php:364 msgid "The export stopped because the filesystem does not have enough free space." msgstr "" -#: includes/export.php:409 +#: includes/export.php:415 msgid "The export contains more files and directories than the configured limit allows." msgstr "" -#: includes/export.php:414 +#: includes/export.php:420 msgid "The export source exceeds the configured aggregate size limit." msgstr "" -#: includes/export.php:549 -#: includes/lease.php:308 -#: includes/lease.php:342 +#: includes/export.php:555 +#: includes/lease.php:314 #: includes/lease.php:348 -#: includes/lease.php:601 -#: includes/lease.php:619 -#: includes/lease.php:628 -#: includes/lease.php:651 +#: includes/lease.php:354 +#: includes/lease.php:607 +#: includes/lease.php:625 +#: includes/lease.php:634 +#: includes/lease.php:657 msgid "The export lost its lock, so it was stopped." msgstr "" -#: includes/export.php:669 +#: includes/export.php:675 msgid "You do not have permission to perform this action." msgstr "" #. translators: 1: Site Address (URL) setting, 2: WordPress Address (URL) setting. -#: includes/export.php:703 +#: includes/export.php:709 #, php-format msgid "This site cannot be exported. EngineScript only hosts sites at the root of their domain, such as https://example.com. It does not support sites in a subfolder (such as /blog), or WordPress in its own folder (such as /wp). Site Address: %1$s. WordPress Address: %2$s." msgstr "" -#: includes/export.php:728 +#: includes/export.php:734 msgid "This site keeps wp-config.php outside the WordPress directory, so the file is not part of the export. The EngineScript importer needs wp-config.php in the export." msgstr "" -#: includes/export.php:783 +#: includes/export.php:789 msgid "The temporary directory is inside a web-served directory, so an export cannot be stored there safely. Define WP_TEMP_DIR in wp-config.php as a private, writable directory outside the web root, then try again." msgstr "" -#: includes/export.php:793 +#: includes/export.php:799 msgid "The export directory is inside a web-served directory. Define WP_TEMP_DIR in wp-config.php as a private, writable directory outside the web root, then try again." msgstr "" -#: includes/export.php:810 +#: includes/export.php:816 msgid "The export directory is not writable. Please adjust filesystem permissions." msgstr "" -#: includes/export.php:836 +#: includes/export.php:842 msgid "The export directory is a symbolic link and cannot be used safely." msgstr "" -#: includes/export.php:842 +#: includes/export.php:848 msgid "Could not create the export directory. Please verify filesystem permissions." msgstr "" -#: includes/export.php:850 +#: includes/export.php:856 msgid "The export directory exists but is not a safe private directory." msgstr "" -#: includes/export.php:855 +#: includes/export.php:861 msgid "Could not secure the export directory permissions." msgstr "" -#: includes/export.php:894 +#: includes/export.php:900 msgid "Could not create a safe private export directory." msgstr "" -#: includes/export.php:900 +#: includes/export.php:906 msgid "Could not secure the private export directory permissions." msgstr "" -#: includes/export.php:906 +#: includes/export.php:912 msgid "Could not create a private export directory. Please verify filesystem permissions." msgstr "" -#: includes/export.php:1009 +#: includes/export.php:1015 msgid "WP-CLI could not create the database export." msgstr "" -#: includes/export.php:1014 +#: includes/export.php:1020 msgid "Could not secure the permissions of the database export file." msgstr "" -#: includes/helpers.php:363 +#: includes/helpers.php:369 msgid "Could not determine a private temporary directory for exports." msgstr "" -#: includes/helpers.php:647 +#: includes/helpers.php:653 msgid "Could not initialize the WordPress Filesystem API." msgstr "" -#: includes/helpers.php:653 +#: includes/helpers.php:659 msgid "This server does not provide the direct filesystem access required for secure exports." msgstr "" -#: includes/lease.php:75 -#: includes/lease.php:93 -#: includes/lease.php:132 -#: includes/lease.php:160 -#: includes/lease.php:165 -#: includes/lease.php:260 -#: includes/lease.php:461 -#: includes/lease.php:554 +#: includes/lease.php:81 +#: includes/lease.php:99 +#: includes/lease.php:138 +#: includes/lease.php:166 +#: includes/lease.php:171 +#: includes/lease.php:266 +#: includes/lease.php:467 +#: includes/lease.php:560 msgid "The export state could not be verified, so the export was not started." msgstr "" -#: includes/lease.php:212 +#: includes/lease.php:218 msgid "The export state is inconsistent, so the export was not started." msgstr "" -#: includes/lease.php:217 +#: includes/lease.php:223 msgid "The export state is invalid, so the export was not started." msgstr "" -#: includes/lease.php:266 +#: includes/lease.php:272 msgid "The export state is busy or unavailable. Please try again." msgstr "" -#: includes/lease.php:548 +#: includes/lease.php:554 msgid "An export process is already running. Please wait for it to complete before starting a new one." msgstr "" -#: includes/lease.php:612 +#: includes/lease.php:618 msgid "The lock of the export expired, so the export was stopped." msgstr "" -#: includes/process.php:50 +#: includes/process.php:56 msgid "The WP-CLI executable was not found in a trusted system location. Install WP-CLI at /usr/local/bin/wp or /usr/bin/wp, or explicitly configure a trusted executable with SSE_WP_CLI_PATH or the sse_wp_cli_path filter." msgstr "" -#: includes/process.php:85 +#: includes/process.php:91 msgid "The configured WP-CLI path must be absolute." msgstr "" -#: includes/process.php:90 -#: includes/process.php:99 +#: includes/process.php:96 +#: includes/process.php:105 msgid "The WP-CLI executable was not found or is not executable." msgstr "" -#: includes/process.php:103 +#: includes/process.php:109 msgid "The WP-CLI executable has unsafe writable permissions." msgstr "" -#: includes/process.php:107 +#: includes/process.php:113 msgid "The ownership of the WP-CLI executable is not trusted." msgstr "" -#: includes/process.php:111 +#: includes/process.php:117 msgid "The WP-CLI executable is located below an untrusted writable directory." msgstr "" -#: includes/process.php:160 +#: includes/process.php:166 msgid "Could not verify the WP-CLI executable identity." msgstr "" -#: includes/process.php:197 -#: includes/process.php:510 +#: includes/process.php:203 +#: includes/process.php:516 msgid "Secure process execution is disabled on this server." msgstr "" -#: includes/process.php:323 -#: includes/process.php:399 +#: includes/process.php:329 +#: includes/process.php:405 msgid "The WP-CLI database export could not be stopped safely." msgstr "" -#: includes/process.php:382 +#: includes/process.php:388 msgid "Could not start the WP-CLI database export." msgstr "" -#: includes/process.php:515 +#: includes/process.php:521 msgid "WP-CLI changed after validation, so the export was stopped." msgstr "" -#: includes/security.php:159 +#: includes/security.php:165 msgid "The export file is not readable." msgstr "" -#: includes/security.php:215 #: includes/security.php:221 +#: includes/security.php:227 msgid "Could not verify the identity of the export file." msgstr "" -#: includes/security.php:236 +#: includes/security.php:242 msgid "No file specified." msgstr "" -#: includes/security.php:241 +#: includes/security.php:247 msgid "Invalid filename." msgstr "" -#: includes/security.php:246 +#: includes/security.php:252 msgid "Invalid export file format." msgstr "" -#: includes/security.php:262 +#: includes/security.php:268 msgid "Invalid export directory." msgstr "" -#: includes/security.php:304 +#: includes/security.php:310 msgid "This export has expired or was deleted. Create a new export." msgstr "" -#: includes/security.php:309 +#: includes/security.php:315 msgid "Invalid file path." msgstr "" diff --git a/psalm.xml b/psalm.xml index 7ffc698..dfbcfb1 100644 --- a/psalm.xml +++ b/psalm.xml @@ -16,4 +16,15 @@ + + + + + + + + + diff --git a/readme.txt b/readme.txt index 4f2ccbf..1be7ffd 100644 --- a/readme.txt +++ b/readme.txt @@ -130,6 +130,7 @@ Released entries describe their historical versions, including earlier tool resu * **Architecture**: Cleanup no longer looks in the fixed-name export directory used before 2.1.1; if `enginescript-site-exporter-exports` still exists in the temporary directory after an update from 2.1.0 or earlier, delete it by hand * **Architecture**: Downloads, deletions, and the archive list check each file name once, and every containment check uses one path comparison; what is accepted or refused is unchanged, and the checks against a file replaced during a download stay * **Architecture**: The HTTPS and importer warnings use WordPress's `wp_admin_notice()`, with unchanged markup; PHP 8 forms (`match`, `str_ends_with()`, arrow functions) replace older code +* **Architecture**: Static analysis runs on Psalm 7; six redundant `(string)` casts of request values are removed. Behavior is unchanged = 2.1.2 = * **Architecture**: Request values and three WordPress return values are narrowed to their expected type before they are used; behavior is unchanged