Add identity query capability to database handlers - #40
Draft
alexstandiford wants to merge 2 commits into
Draft
alexstandiford wants to merge 2 commits into
alexstandiford wants to merge 2 commits into
Conversation
alexstandiford
force-pushed
the
codex/db-identity-query
branch
from
September 20, 2026 21:58
00e9a5f to
9a31596
Compare
alexstandiford
force-pushed
the
codex/db-identity-query
branch
from
September 20, 2026 21:59
9a31596 to
cc41720
Compare
alexstandiford
changed the base branch from
main
to
codex/db-timestamp-factory-compat-main
September 20, 2026 22:09
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.
Summary
Expose the optional Datastore identity-query capability from identifiable database handlers.
findIds()now validates its caller input before execution, resets query state, and selects only identity fields.This PR is stacked on DB PR 41 for current-main timestamp compatibility and shared CI prerequisites. It also depends on phpnomad/datastore PR 11, specifically its final prerequisite commit
fa0392a74d35bac3a0f1812d691d5a2163d80d68oncodex/ci-prerequisites-clean.The DB package now declares
phpnomad/event:^1.0directly becauseDatabaseServiceProvideruses its runtime interface. Production keeps the releasedphpnomad/datastore:^2.0constraint. CI checks out the PR11 branch and supplies it through a path repository with a runner-only version override.Testing
composer validate --strict: passedcomposer install --dry-run --no-interaction: lockfile is installable with nothing to changevendor/bin/phpunit --colors=never: 41 tests, 144 assertionsvendor/bin/phpstan analyse --no-progress --level=9 lib/ tests/: no errors with the exact baseline inherited from PR41git diff --check: passed*, and removal of pre-query validationfa0392a74d35bac3a0f1812d691d5a2163d80d68through the path override, then passed PHPUnit and full level-9 PHPStan under PHP 8.2The runtime proof used Datastore commit
fa0392a74d35bac3a0f1812d691d5a2163d80d68and this DB branch:Observed output:
PASS real wpdb + MySQL identity queryThe harness exercised WordPress
wpdbagainst MySQL 8.4, WordPress QueryStrategy, the concrete identifiable DB handler, grouped OR conditions, identity-only projection, limit 1, and offset 0. It also verified malformed groups, limit 0, and offset -1 execute no query.Existing advisory
composer audit --locked --no-interactionreports CVE-2026-24765 in the existing PHPUnit 9.6.22 development dependency. The unchanged main commit43551fc05d550c3daa6606c3d91fcddc0191b984reports the same advisory. This PR does not introduce or change that dependency.