Repository navigation
Conversation
W3TC's DbCache wrapper reads `$wpdb->col_info` after each cacheable query, which triggers `wpdb::load_col_info()` -> `mysqli_num_fields()`. For non-SELECT queries the result is `true` (bool), so this fatals with "Argument #1 ($result) must be of type mysqli_result, true given". W3TC bypasses caching for write queries via a regex that matches `START TRANSACTION`, `INSERT`, `COMMIT`, etc. — but not `BEGIN`. Switching `BEGIN` to `START TRANSACTION` (semantically identical in MySQL) lets W3TC's regex catch it and skip the col_info path. Reproduced locally with W3TC 2.9.4: identical stack trace with `BEGIN`, no fatal with `START TRANSACTION`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Filip Ilić <ilic.filip@gmail.com>
Fix W3 Total Cache DbCache fatal in batch_insert
Updates wp-coding-standards/wpcs to 3.4.1, which fixes a security issue in the WordPress.WP.EnqueuedResourceParameters sniff where running PHPCS over untrusted PHP code could lead to arbitrary command execution on the scanning host (GHSA-3pwp-g2mj-5p3v). Also bumps the required transitive dependencies: - phpcsstandards/phpcsutils to 1.2.3 - phpcsstandards/phpcsextra to 1.5.1 Lock-file only; composer.json constraints already allowed 3.4.1. Verified locally with PHPCS: no new violations. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Filip Ilic <ilic.filip@gmail.com>
Security: update WPCS to 3.4.1
Every request writes the options it read to wp_option_optimizer_tracked
on shutdown with INSERT ... ON DUPLICATE KEY UPDATE. InnoDB locks rows in
VALUES order, which followed per-request access order, so concurrent
requests locked the same rows in different orders and deadlocked
("Deadlock found when trying to get lock"), losing that request's counts.
Sort the options before writing so all writers lock in one order. On a
failed insert, ROLLBACK instead of sending COMMIT (which also hid the
error by clearing $wpdb->last_error), and retry once on a deadlock; the
deadlock rolls back the whole transaction, so the retry can't double count.
Reproduced locally with 20 parallel writers x 50 batch_insert() calls of
200 shuffled options: ~920/1000 deadlocks before, 0/1000 after with all
200000 increments landed. Retry path verified with a forced deadlock.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PHPStan 1.12 to 2.3, with szepeviktor/phpstan-wordpress 1.3 to 2.0 (which brings WordPress stubs 6.9 to 7.1). The code needed no changes. Two config entries did: - excludePaths: tests does not exist in this repository, which PHPStan 2 refuses; marked optional as tests (?). - The ignore for missingType.generics matched nothing on PHPStan 2 and is reported as unused; removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Filip Ilic <ilic.filip@gmail.com>
Fix deadlocks when concurrent requests write tracked options
Update PHPStan to 2.3
* Bump version to 1.6.2 - Version 1.6.2 in the plugin header, readme Stable tag and package.json. - Changelog: deadlock fix, W3 Total Cache DbCache fix, readme improvements. - Restore "Requires at least: 6.7". The readme rework lowered it to 6.4, but the plugin calls wp_autoload_values_to_autoload() (WP 6.6+) unguarded, so WP 6.4/6.5 sites would be offered an update that fatals. - "Tested up to: 7.1" (current WordPress; Plugin Check flags 7.0). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Add 1.6.2 upgrade notice Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Rename plugin to AAA Autoload Optimizer and release as 1.7.0 - Plugin name, readme title and all user-facing strings: "AAA Autoload Optimizer". #76 had renamed the headers to "Autoload Optimizer"; the admin page, README.md, known-plugins.json and docblocks still said "AAA Option Optimizer". The Tools menu label is now "Autoload Optimizer". - Slug, text domain, option names and PHP namespaces are unchanged. - Version 1.6.2 -> 1.7.0 (plugin header, Stable tag, package.json, changelog, upgrade notice). The rename is a minor-version change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
- New WordPress.org banners (772x250, 1544x500) with the new name. - Add Dutch banners as banner-*-nl_NL.png, the locale naming WordPress.org uses for localized assets. - Replace github_banner_aaaoo_pp.png with github_banner_aaaao_pp.png and point README.md at it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Update banners for the AAA Autoload Optimizer rename
|
Test on Playground |
Composer package changes
|
jdevalk
approved these changes
Oct 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release 1.7.0: merges
developintomain.Requires at least: 6.7,Tested up to: 7.1nl_NL) bannersbatch_insertTesting is described in #83.
After merging, publish the GitHub release
v1.7.0frommain. Publishing it runsdeploy.yml, which pushes the plugin and the.wordpress-org/assets to WordPress.org.🤖 Generated with Claude Code