From 59951e2166bc38766627eda1ac2aabf9a6ce0404 Mon Sep 17 00:00:00 2001 From: MobileMage Date: Sat, 3 Oct 2026 14:43:16 +0100 Subject: [PATCH] docs: set the WordPress and WooCommerce floors The PHP standard left the floors of WordPress plugins open until the team had tested the Additional Checkout Fields API. The WooCommerce plugin's tests show that the checkout block first skips a hidden address field on the server in WooCommerce 10.0, so 10.0 is the floor, and WordPress 6.7 follows from it. WordPress's test suite needs PHPUnit 9, so plugin tests use 9.6. The glossary gains the check status, the word that the plugin, its order meta and its docs use. Signed-off-by: MobileMage --- CONTEXT.md | 4 ++++ standards/languages/php.md | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CONTEXT.md b/CONTEXT.md index fcc8182..d09bbae 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -169,6 +169,10 @@ _Avoid_: input, widget, picker To show the user what a postcode points to before the app stores it. _Avoid_: verify, validate (for this step) +**Check status**: +What the WooCommerce plugin learned about the postcode of an order: `valid`, `invalid`, `unchecked` or `error`. The order meta `_gatepost_postcode_check` holds it. +_Avoid_: verification status, validation result + **Tell**: A habit that makes code look machine-written, such as very long lines. _Avoid_: smell (smells are design problems), anti-pattern diff --git a/standards/languages/php.md b/standards/languages/php.md index 1d13801..de05ff5 100644 --- a/standards/languages/php.md +++ b/standards/languages/php.md @@ -1,6 +1,6 @@ # PHP standards -Version 1.0, 1 Oct 2026. +Version 1.1, 3 Oct 2026. This file and `standards/CODING_STANDARDS.md` together are the standard for PHP code. Part A applies to the SDK in the `php` repo. Part B applies to WordPress plugins, such as the WooCommerce plugin. Each part names its own code style, because the two ecosystems use different conventions. @@ -9,7 +9,8 @@ This file and `standards/CODING_STANDARDS.md` together are the standard for PHP - PHP 8.1 or later. CI tests PHP 8.1 and the newest PHP release. - PHP 8.1 reached end of life on 31 Dec 2025, and PHP 8.2 reaches it on 31 Dec 2026. The 8.1 floor serves WordPress stores on older hosting. Under VER-1, ADR 0001 must record this trade-off with current WordPress usage data before the first release. If the data does not support 8.1, raise the floor. - PHPUnit 11 and later need PHP 8.2. CI runs PHPUnit 10 on PHP 8.1 and the newest PHPUnit on newer PHP versions. -- WordPress and WooCommerce: the floors are not defined yet. The team sets them after it tests the Additional Checkout Fields API, and before the first release of a plugin. +- WordPress 6.7 and WooCommerce 10.0 or later. WooCommerce 10.0 is the first release whose checkout block skips a hidden address field on the server. On 9.9, a required field that a rule hides still stopped the order. WooCommerce 10.0 needs WordPress 6.7. ADR 0002 of the `woocommerce` repo holds the test results and the usage data. +- WordPress's test suite runs only on PHPUnit 9, so the tests of a WordPress plugin use PHPUnit 9.6 on every PHP version. ## Part A: the SDK