Skip to content

Port test improvements and db_version check refactor from #11256#147

Merged
peterwilsoncc merged 6 commits intopeterwilsoncc:collaboration/table-awareness-object-cachefrom
josephfusco:port/single-table-improvements
May 6, 2026
Merged

Port test improvements and db_version check refactor from #11256#147
peterwilsoncc merged 6 commits intopeterwilsoncc:collaboration/table-awareness-object-cachefrom
josephfusco:port/single-table-improvements

Conversation

@josephfusco
Copy link
Copy Markdown
Collaborator

@josephfusco josephfusco commented May 6, 2026

Cherry-picks recent test improvements and the db_version check refactor from WordPress#11256 onto the hybrid branch.

The cron cleanup move also pulled in test_cron_cleanup_deletes_expired_awareness_rows (which you had added on this branch) — it referenced helpers being moved out, so it goes to collaborationCronCleanup.php too. Otherwise it would have broken.

Three commits from WordPress#11256 were skipped because their substance is already in this branch: the collaboration_id rename, the stale-compaction-as-update fix, and PHPCS coding standards fixes.

One commit (4744b42918) has a generic GitHub-web-edit subject — happy to amend to something clearer if preferred.

josephfusco and others added 6 commits May 6, 2026 12:26
The database schema requirement is a system-level constraint,
not a user preference. Move it from wp_is_collaboration_enabled()
to wp_is_collaboration_allowed() where it belongs.
Co-authored-by: Peter Wilson <519727+peterwilsoncc@users.noreply.github.com>
Remove redundant DELETE in set_up() as transaction rollback
handles cleanup. Use REST_TESTS_IMPOSSIBLY_HIGH_NUMBER for
nonexistent post ID test.
Separate cron cleanup tests from the REST endpoint test file
into tests/phpunit/tests/collaboration/collaborationCronCleanup.php.
Add message parameters to bare assertions for easier failure
identification. Replace update_option('db_version') with
pre_option_db_version filter so the value auto-restores on
test teardown.
@josephfusco josephfusco marked this pull request as ready for review May 6, 2026 16:40
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props joefusco.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@josephfusco josephfusco requested a review from peterwilsoncc May 6, 2026 16:45
Copy link
Copy Markdown
Owner

@peterwilsoncc peterwilsoncc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a few things I'll probably change over the course of the day but I'll merge this in to my branch so I can get started with a test run.

Thank for this, much appreciated.

@peterwilsoncc peterwilsoncc merged commit 837fe7c into peterwilsoncc:collaboration/table-awareness-object-cache May 6, 2026
9 checks passed
@josephfusco josephfusco deleted the port/single-table-improvements branch May 7, 2026 01:42
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.

2 participants