Skip to content

v1.7.0 - #85

Merged
jdevalk merged 12 commits into
mainfrom
develop
Oct 15, 2026
Merged

jdevalk merged 12 commits into
mainfrom
develop

Conversation

@ilicfilip

Copy link
Copy Markdown
Collaborator

Release 1.7.0: merges develop into main.

Testing is described in #83.

After merging, publish the GitHub release v1.7.0 from main. Publishing it runs deploy.yml, which pushes the plugin and the .wordpress-org/ assets to WordPress.org.

🤖 Generated with Claude Code

ilicfilip and others added 12 commits May 6, 2026 14:36
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>
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
* 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
@github-actions

Copy link
Copy Markdown

Test on Playground
Test this pull request on the Playground
or download the zip

@github-actions

Copy link
Copy Markdown
Composer package changes
Dev Packages Operation Base Target
dealerdirect/phpcodesniffer-composer-installer Upgraded v1.2.0 v1.2.1
php-stubs/wordpress-stubs Upgraded v6.9.0 v7.1.2
phpcsstandards/phpcsextra Upgraded 1.5.0 1.5.1
phpcsstandards/phpcsutils Upgraded 1.2.2 1.2.3
phpstan/phpstan Upgraded 1.12.32 2.3.0
szepeviktor/phpstan-wordpress Upgraded v1.3.5 v2.0.4
wp-coding-standards/wpcs Upgraded 3.3.0 3.4.1
symfony/polyfill-php73 Removed v1.33.0 -

@jdevalk
jdevalk merged commit d85595f into main Oct 15, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants