Skip to content

Commit e9bcba4

Browse files
committed
chore(release): bump version to 2.12.0
1 parent 7da0973 commit e9bcba4

7 files changed

Lines changed: 38 additions & 20 deletions

File tree

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
# Changelog
22

3-
## Unreleased
4-
5-
- **Feature: public integration API (`wp_sudo_check()` / `wp_sudo_require()`)** β€” added first-party helpers for third-party plugins/themes to require an active sudo session without registering full action rules. `wp_sudo_require()` can redirect to the challenge page in session-only mode (or return `false` when redirecting is disabled/unavailable) and emits `wp_sudo_action_gated` with surface `public_api` for audit visibility.
6-
- **Docs: developer reference update** β€” documented the new public helper API, args, usage example, and added `public_api` to the documented `wp_sudo_action_gated` surface list.
7-
- **494 unit tests, 1286 assertions.**
3+
## 2.12.0
4+
5+
- **Feature: WP-CLI operator commands** β€” added `wp sudo status`, `wp sudo revoke --user=<id>`, and `wp sudo revoke --all` for session inspection and revocation workflows.
6+
- **Feature: Stream audit bridge** β€” added optional `bridges/wp-sudo-stream-bridge.php`, mapping all 9 WP Sudo audit hooks into Stream records. Bridge remains inert when Stream APIs are unavailable and supports late plugin load order.
7+
- **Feature: public integration API (`wp_sudo_check()` / `wp_sudo_require()`)** β€” added first-party helpers for third-party plugins/themes to require an active sudo session without registering full action rules. `wp_sudo_require()` can redirect to the challenge page in session-only mode (or return `false` when redirecting is disabled/unavailable) and emits `wp_sudo_action_gated` with surface `public_api`.
8+
- **Docs: release alignment** β€” updated developer reference and manual testing docs for Stream bridge and public API helpers; refreshed roadmap and contributing guidance for current development priorities and repo-local integration test paths.
9+
- **Pre-release hygiene** β€” regenerated `bom.json`.
10+
- **494 unit tests, 1286 assertions. 135 integration tests in CI.**
811

912
## 2.11.1
1013

β€Žbom.jsonβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@
9898
"properties": [
9999
{
100100
"name": "cdx:composer:package:distReference",
101-
"value": "2dd36d20d82aee32baadb4adb2b208a70dcf718e"
101+
"value": "7da09738076e763760c467b1d05bfe70bf5583f4"
102102
},
103103
{
104104
"name": "cdx:composer:package:sourceReference",
105-
"value": "2dd36d20d82aee32baadb4adb2b208a70dcf718e"
105+
"value": "7da09738076e763760c467b1d05bfe70bf5583f4"
106106
},
107107
{
108108
"name": "cdx:composer:package:type",

β€Žphpstan-bootstrap.phpβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*/
1111

1212
// Plugin constants (defined in wp-sudo.php at runtime).
13-
define( 'WP_SUDO_VERSION', '2.11.1' );
13+
define( 'WP_SUDO_VERSION', '2.12.0' );
1414
define( 'WP_SUDO_PLUGIN_DIR', __DIR__ . '/' );
1515
define( 'WP_SUDO_PLUGIN_URL', 'https://example.com/wp-content/plugins/wp-sudo/' );
1616
define( 'WP_SUDO_PLUGIN_BASENAME', 'wp-sudo/wp-sudo.php' );

β€Žreadme.mdβ€Ž

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ WP Sudo is built for correctness and contributor legibility, not just functional
184184

185185
**Test-driven development.** New code requires a failing test before production code is written. The suite is split into two deliberate tiers:
186186

187-
- **Unit tests** (478 tests, 1228 assertions) β€” use [Brain\Monkey](https://brain-wp.github.io/BrainMonkey/) to mock all WordPress functions. Run in ~0.5s with no database. Cover request matching, session state machine, policy enforcement, and hook registration.
188-
- **Integration tests** (130 tests) β€” run against real WordPress + MySQL via `WP_UnitTestCase`. Cover full reauth flows, bcrypt verification, transient TTL, REST and AJAX gating, Two Factor interaction, multisite session isolation, upgrader migrations, and all 9 audit hooks.
187+
- **Unit tests** (494 tests, 1286 assertions) β€” use [Brain\Monkey](https://brain-wp.github.io/BrainMonkey/) to mock all WordPress functions. Run in ~0.5s with no database. Cover request matching, session state machine, policy enforcement, and hook registration.
188+
- **Integration tests** (135 tests) β€” run against real WordPress + MySQL via `WP_UnitTestCase`. Cover full reauth flows, bcrypt verification, transient TTL, REST and AJAX gating, Two Factor interaction, multisite session isolation, upgrader migrations, and all 9 audit hooks.
189189

190190
**Static analysis and code style.** PHPStan, Psalm (with WordPress stubs/plugin), and PHPCS (WordPress-Extra + WordPress-Docs + WordPressVIPMinimum) run on every push and pull request via GitHub Actions, alongside the full test matrix (PHP 8.1–8.4, WordPress latest + trunk). A nightly scheduled run catches WordPress trunk regressions early. Type coverage is published to Shepherd on default-branch pushes (`main`/`master`).
191191

@@ -197,16 +197,16 @@ WP Sudo is built for correctness and contributor legibility, not just functional
197197

198198
| Component | Size |
199199
|---|---|
200-
| **Production PHP** (`includes/`, `wp-sudo.php`, `uninstall.php`, `mu-plugin/`, `bridges/`) | 288 KB Β· 7,823 lines |
200+
| **Production PHP** (`includes/`, `wp-sudo.php`, `uninstall.php`, `mu-plugin/`, `bridges/`) | 312 KB Β· 8,438 lines |
201201
| **Assets** (screenshots, banner images) | 5.0 MB |
202-
| **Tests** (`tests/`) | 648 KB Β· 15,539 lines |
202+
| **Tests** (`tests/`) | 672 KB Β· 16,058 lines |
203203
| **Docs** (`docs/` + root-level md/txt) | 348 KB |
204-
| **Total PHP** (production + tests, excl. vendor) | 23,402 lines |
205-
| **Test-to-production ratio** | 2.0:1 |
204+
| **Total PHP** (production + tests, excl. vendor) | 24,496 lines |
205+
| **Test-to-production ratio** | 1.9:1 |
206206

207207
No production dependencies. Dev dependencies (PHPUnit, PHPStan, Psalm, PHPCS, Brain\Monkey, Mockery) live in `vendor/` and are not shipped.
208208

209-
*Last updated: 2026-03-05. See CLAUDE.md for the update command.*
209+
*Last updated: 2026-03-08. See CLAUDE.md for the update command.*
210210

211211
## Screenshots
212212

@@ -240,6 +240,14 @@ No production dependencies. Dev dependencies (PHPUnit, PHPStan, Psalm, PHPCS, Br
240240

241241
## Changelog
242242

243+
### 2.12.0
244+
245+
- **Feature: WP-CLI operator commands** β€” added `wp sudo status`, `wp sudo revoke --user=<id>`, and `wp sudo revoke --all` for session inspection and revocation workflows.
246+
- **Feature: Stream audit bridge** β€” added optional `bridges/wp-sudo-stream-bridge.php`, mapping all 9 WP Sudo audit hooks into Stream records with inert behavior when Stream APIs are unavailable.
247+
- **Feature: public integration API (`wp_sudo_check()` / `wp_sudo_require()`)** β€” added first-party helpers for third-party plugins/themes to require active sudo sessions without full Gate-rule registration.
248+
- **Docs and release hygiene** β€” updated developer reference/manual testing for Stream + public API, refreshed roadmap priorities, and regenerated `bom.json`.
249+
- **494 unit tests, 1286 assertions. 135 integration tests in CI.**
250+
243251
### 2.11.1
244252

245253
- **Docs release + metadata alignment** β€” corrected post-v2.11.0 documentation drift: roadmap completion markers, RC re-test guidance, and release notes alignment across `CHANGELOG.md`, `readme.md`, and `readme.txt`.

β€Žreadme.txtβ€Ž

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Tags: sudo, security, reauthentication, access control, admin prote
99
Requires at least: 6.2
1010
Tested up to: 7.0
1111
Requires PHP: 8.0
12-
Stable tag: 2.11.1
12+
Stable tag: 2.12.0
1313
License: GPL-2.0-or-later
1414
License URI: https://www.gnu.org/licenses/gpl-2.0.html
1515

@@ -150,7 +150,7 @@ WP Sudo is built for correctness and contributor legibility, not just functional
150150

151151
Architecture: a single SPL autoloader maps the WP_Sudo\* namespace to includes/class-*.php. The Gate class detects the entry surface (admin UI, AJAX, REST, WP-CLI, Cron, XML-RPC, Application Passwords, WPGraphQL), matches the incoming request against a registry of 29+ rules, and challenges, soft-blocks, or hard-blocks based on surface and policy. All gating decisions happen server-side in PHP hooks β€” JavaScript is used only for UX.
152152

153-
Testing: the suite is split into two tiers. Unit tests (478 tests, 1228 assertions) use Brain\Monkey to mock WordPress functions and run in ~0.4s. Integration tests (130 tests) run against real WordPress + MySQL and cover full reauth flows, AJAX and REST gating, Two Factor interaction, multisite isolation, uninstall cleanup, and all 9 audit hooks.
153+
Testing: the suite is split into two tiers. Unit tests (494 tests, 1286 assertions) use Brain\Monkey to mock WordPress functions and run in ~0.4s. Integration tests (135 tests) run against real WordPress + MySQL and cover full reauth flows, AJAX and REST gating, Two Factor interaction, multisite isolation, uninstall cleanup, and all 9 audit hooks.
154154

155155
CI: GitHub Actions runs PHPStan level 6 and PHPCS on every push and PR, the full test matrix across PHP 8.1-8.4 and WordPress latest + trunk, and a nightly scheduled run against WordPress trunk.
156156

@@ -168,6 +168,13 @@ Extensibility: the action registry is filterable via wp_sudo_gated_actions. Nine
168168

169169
== Changelog ==
170170

171+
= 2.12.0 =
172+
* **Feature: WP-CLI operator commands** β€” added `wp sudo status`, `wp sudo revoke --user=<id>`, and `wp sudo revoke --all` for session inspection and revocation workflows.
173+
* **Feature: Stream audit bridge** β€” added optional `bridges/wp-sudo-stream-bridge.php`, mapping all 9 WP Sudo audit hooks into Stream records with inert behavior when Stream APIs are unavailable.
174+
* **Feature: public integration API (`wp_sudo_check()` / `wp_sudo_require()`)** β€” added first-party helpers for third-party plugins/themes to require active sudo sessions without full Gate-rule registration.
175+
* **Docs and release hygiene** β€” updated developer reference/manual testing for Stream + public API, refreshed roadmap priorities, and regenerated `bom.json`.
176+
* **494 unit tests, 1286 assertions. 135 integration tests in CI.**
177+
171178
= 2.11.1 =
172179
* **Docs release + metadata alignment** β€” corrected post-v2.11.0 documentation drift: roadmap completion markers, RC re-test guidance, and release notes alignment across `CHANGELOG.md`, `readme.md`, and `readme.txt`.
173180
* **Version annotation fixes** β€” corrected `@since` annotations introduced in the v2.11.0 development cycle so Phase 3/4 additions no longer reference the nonexistent `2.10.3` version.

β€Žtests/bootstrap.phpβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
define( 'WP_CONTENT_DIR', '/tmp/fake-wordpress/wp-content' );
1616

1717
// ── Plugin constants (normally defined in wp-sudo.php) ───────────────
18-
define( 'WP_SUDO_VERSION', '2.11.1' );
18+
define( 'WP_SUDO_VERSION', '2.12.0' );
1919
define( 'WP_SUDO_PLUGIN_DIR', dirname( __DIR__ ) . '/' );
2020
define( 'WP_SUDO_PLUGIN_URL', 'https://example.com/wp-content/plugins/wp-sudo/' );
2121
define( 'WP_SUDO_PLUGIN_BASENAME', 'wp-sudo/wp-sudo.php' );

β€Žwp-sudo.phpβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* Plugin Name: Sudo
44
* Plugin URI: https://github.com/dknauss/wp-sudo
55
* Description: Action-gated reauthentication for WordPress. Dangerous operations require password confirmation before they proceed β€” regardless of user role.
6-
* Version: 2.11.1
6+
* Version: 2.12.0
77
* Requires at least: 6.2
88
* Requires PHP: 8.0
99
* Author: Dan Knauss
@@ -22,7 +22,7 @@
2222
}
2323

2424
// Plugin version.
25-
define( 'WP_SUDO_VERSION', '2.11.1' );
25+
define( 'WP_SUDO_VERSION', '2.12.0' );
2626

2727
// Plugin directory path.
2828
define( 'WP_SUDO_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );

0 commit comments

Comments
Β (0)