Skip to content

API design improvements - #197

Merged
yann-eugone merged 4 commits into
1.xfrom
refactor-api-design
Apr 17, 2026
Merged

API design improvements#197
yann-eugone merged 4 commits into
1.xfrom
refactor-api-design

Conversation

@yann-eugone

Copy link
Copy Markdown
Contributor

Summary

DoctrineDBALInsertWriter — column type auto-detection

DoctrineDBALInsertWriter now accepts an optional $types parameter. When omitted (null, the default), column types are inferred from the table schema via DBAL schema introspection on the first write() call, preventing silent binding failures for PHP booleans, DateTimeInterface values, and similar types. Pass types: [] explicitly to disable type resolution and restore the previous behavior.

batch-symfony-console — injectable interfaces for shell execution

CommandRunner is now final. Its protected exec() test seam has been replaced by two explicit interfaces:

  • ShellRunnerInterface — abstracts the shell execution layer; ShellRunner is the default implementation
  • CommandRunnerInterface — allows RunCommandJobLauncher to be tested without subclassing CommandRunner

If you were subclassing CommandRunner to override exec() in tests, inject a ShellRunnerInterface instead.

batch-openspout — cleaner HeaderStrategy and SheetFilter API

Public @internal methods have been replaced by intentional, self-documenting contracts:

  • HeaderStrategy: setHeaders() / getItem() replaced by a single process(array $row, bool $isFirstRow): array
  • SheetFilter: list(ReaderInterface): array replaced by accepts(SheetInterface): bool

If you implemented either interface, update your implementations accordingly.

Allows callers to pass DBAL column type hints, preventing silent mapping
failures for PHP booleans, DateTimeInterface, and null values.
@codecov

codecovBot commented Apr 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.33%. Comparing base (a47fbda) to head (b8bba61).
⚠️ Report is 5 commits behind head on 1.x.

Additional details and impacted files
@@ Coverage Diff @@## 1.x #197 +/- ##
=========================================
Coverage 99.32% 99.33% - Complexity 1000 1001 +1 
=========================================
Files 172 173 +1 Lines 3127 3140 +13 =========================================
+ Hits 3106 3119 +13 
Misses 21 21 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…unner
Removes the protected exec() test seam. CommandRunner is now final and
accepts a ShellRunnerInterface for shell execution, making the seam
explicit and injectable. RunCommandJobLauncher now depends on
CommandRunnerInterface so it can be mocked without subclassing.
Replace setHeaders()/getItem() with a single process(row, isFirstRow) on
HeaderStrategy, and list(ReaderInterface) with accepts(SheetInterface) on
SheetFilter. Public @internal methods are a contradiction; the new API is
intentional and self-documenting.
@yann-eugone
yann-eugone merged commit 4aeb8ae into 1.xApr 17, 2026
10 checks passed
@yann-eugone
yann-eugone deleted the refactor-api-design branch April 17, 2026 14:01
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@yann-eugone@J-Ben87