Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/scripts/check-wordpress-tested-up-to.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

WORDPRESS_LATEST_VERSION = os.environ.get("WORDPRESS_LATEST_VERSION")
WORDPRESS_VERSION_CHECK_FILE = Path("wordpress-version-check.json")
METADATA_PATHS = {Path("enginescript-site-optimizer.php"), Path("readme.txt")}
# Only readme.txt: Plugin Check (2.2 and later) refuses "Tested up to" in the plugin header
METADATA_PATHS = {Path("readme.txt")}
DEFAULT_EXCLUDED_DIRS = {
".git",
"build",
Expand Down
13 changes: 7 additions & 6 deletions .github/scripts/test-automation.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,12 @@ def findings(self) -> list[dict[str, object]]:

def test_metadata_changes_only_authoritative_headers(self) -> None:
findings = self.findings()
self.assertEqual(2, len(findings))
before = {name: (self.root / name).read_bytes() for name in ("README.md", ".private/review.md")}
self.assertEqual(
["enginescript-site-optimizer.php", "readme.txt"], metadata.update_tested_up_to_entries(findings, "9.9")
)
self.assertEqual(1, len(findings))
before = {
name: (self.root / name).read_bytes()
for name in ("enginescript-site-optimizer.php", "README.md", ".private/review.md")
}
self.assertEqual(["readme.txt"], metadata.update_tested_up_to_entries(findings, "9.9"))
self.assertEqual([], metadata.get_failures("9.9", self.findings()))
for name, content in before.items():
self.assertEqual(content, (self.root / name).read_bytes())
Expand Down Expand Up @@ -544,7 +545,7 @@ def test_helpers_ignore_git_on_path(self) -> None:
self.write("bin/git", "#!/bin/sh\nexit 97\n")
(self.root / "bin/git").chmod(0o700)
with patch.dict(os.environ, PATH=f"{self.root / 'bin'}:{os.environ['PATH']}"):
self.assertEqual(2, len(self.findings()))
self.assertEqual(1, len(self.findings()))
build, archive = self.create_package_fixture()
with contextlib.redirect_stdout(io.StringIO()):
self.assertEqual(9, package.validate_package(self.root, build, archive))
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/wp-compatibility-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1564,6 +1564,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
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Reject the special-use names `alt` and `onion` in domain lists.
- Raise the minimum WordPress version to 7.0, the version Jetpack requires.
- Raise the minimum PHP version from 8.2 to 8.3. PHP 8.2 reaches end of life on December 31, 2026, and EngineScript servers no longer support it. A site on PHP 8.2 keeps its current version of the plugin until it moves to PHP 8.3 or newer. The tests cover PHP 8.3 to 8.5.
- Declare "Tested up to" only in `readme.txt`, not in the plugin header. Plugin Check refuses the field in the plugin header, because two copies can drift apart; the scheduled WordPress version check now updates `readme.txt` only. Static analysis runs on Psalm 7.
- Use one term, "domain", for an entry of the Preconnect and DNS Prefetch lists in the settings, the rejection reasons, and the documentation. The reasons now read "Invalid domain entry.", "No domain name found.", "Invalid domain name.", and "IP addresses and private, local, or reserved domain names are not allowed."
- "Remove WordPress Version" now also removes the generator tag from feeds, and "Remove Shortlink" also removes the shortlink HTTP response header.
- Stop adding the plugin's resource hints to the login screen.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading
Loading