Skip to content

refactor/transaction-factory-composition-root#4

Merged
kuaukutsu merged 2 commits into
mainfrom
refactor/transaction-factory-composition-root
May 18, 2026
Merged

refactor/transaction-factory-composition-root#4
kuaukutsu merged 2 commits into
mainfrom
refactor/transaction-factory-composition-root

Conversation

@kuaukutsu

Copy link
Copy Markdown
Member

No description provided.

kuaukutsu and others added 2 commits May 18, 2026 09:01
…root

Type was an @api enum that imported internal classes and exposed
makeFactoryTransaction() returning class-string<FactoryTransaction>,
leaking an internal type through the public API surface.

- Type is now a pure public dialect enum (cases + value()), with no
  reference to internal classes.
- Connection no longer depends on the public Type for behavior; its
  constructor takes class-string<FactoryTransaction> directly.
- Driver (the composition root that already resolves the dialect via
  prepareDSN) decides which transaction factory to use via a private
  makeFactoryTransaction(), so the choice is not part of any public
  surface.
- StatementMysqlTest constructs Connection with the factory class-string.
- composer.json: drop the dbschemix/core vcs repository entry.

phpcs/psalm/phpstan green; 29/29 Testo tests pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@kuaukutsu kuaukutsu self-assigned this May 18, 2026
@kuaukutsu kuaukutsu merged commit 6ad84f3 into main May 18, 2026
4 checks passed
@kuaukutsu kuaukutsu deleted the refactor/transaction-factory-composition-root branch May 18, 2026 09:49
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