Skip to content

bugfix/type-value-and-post-review-cleanup#5

Merged
kuaukutsu merged 2 commits into
mainfrom
bugfix/type-value-and-post-review-cleanup
May 26, 2026
Merged

bugfix/type-value-and-post-review-cleanup#5
kuaukutsu merged 2 commits into
mainfrom
bugfix/type-value-and-post-review-cleanup

Conversation

@kuaukutsu

Copy link
Copy Markdown
Member

No description provided.

kuaukutsu and others added 2 commits May 26, 2026 20:18
ltrim($name, 'PDO_') treats the second argument as a character set,
so PDO_PGSQL collapsed to "gsql" (P, D, O, _ all eaten until the G).
Replace with substr($name, 4) which trims the literal "PDO_" prefix.

Post-review cleanup bundled in:
- Statement: use Override; for #[Override] (consistency)
- Driver: translate Russian @note comment to English
- ErrorInfo: drop dead getMessage(); annotate __toString with #[Override]
- phpcs: exempt top-level src/*.php (@api classes) from RequireAbstractOrFinal
  so consumers can extend the public Driver

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Connection duplicates the fetchRecord/exec bodies from Statement instead
of delegating. StatementTest exercises that code only via Transaction,
so the Connection copies were not under test. Add seven tests against a
real in-memory SQLite PDO (matching the existing test style):

- exec() empty-params branch (PDO::exec direct)
- exec() with named params (prepare + execute)
- exec() param values are bound, not interpolated
- fetchRecord() returns FETCH_KEY_PAIR map
- fetchRecord() with bound parameter filters rows
- fetchRecord() empty result returns []
- exec() repeated calls each prepare/execute cleanly

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kuaukutsu kuaukutsu self-assigned this May 26, 2026
@kuaukutsu kuaukutsu merged commit 761a95b into main May 26, 2026
4 checks passed
@kuaukutsu kuaukutsu deleted the bugfix/type-value-and-post-review-cleanup branch May 26, 2026 20:33
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.

1 participant