Skip to content

Add DBAL 4 support alongside DBAL 3.6 - #38

Merged
fguimier merged 2 commits into
mainfrom
feat/dbal-4-support
Jul 16, 2026
Merged

Add DBAL 4 support alongside DBAL 3.6#38
fguimier merged 2 commits into
mainfrom
feat/dbal-4-support

Conversation

@fguimier

Copy link
Copy Markdown
Contributor
  • doctrine/dbal constraint: ^2.8|^3.0 -> ^3.6|^4.0 (CI lowest/highest now covers both majors)
  • ramsey/uuid-doctrine: ^1.4 -> ^1.4|^2.0
  • AbstractFixedLengthStringType: getVarcharTypeDeclarationSQL() -> getStringTypeDeclarationSQL() (removed in DBAL 4, available since 3.4)
  • DateTimeImmutableMicroSecondsType: ConversionException static factories are DBAL 3 only; use Types\Exception{InvalidFormat,InvalidType} when available (DBAL 4)
  • getName() and requiresSQLCommentHint() overrides kept while DBAL 3 is supported
  • Tests: replace removed getMockForAbstractClass() with createStub/createMock, @dataProvider annotations -> attributes (PHPUnit 13), drop unused doctrine/cache + doctrine/annotations dev deps

Florian Guimier and others added 2 commits July 16, 2026 20:33
- doctrine/dbal constraint: ^2.8|^3.0 -> ^3.6|^4.0 (CI lowest/highest now covers both majors)
- ramsey/uuid-doctrine: ^1.4 -> ^1.4|^2.0
- AbstractFixedLengthStringType: getVarcharTypeDeclarationSQL() -> getStringTypeDeclarationSQL() (removed in DBAL 4, available since 3.4)
- DateTimeImmutableMicroSecondsType: ConversionException static factories are DBAL 3 only; use Types\Exception\{InvalidFormat,InvalidType} when available (DBAL 4)
- getName() and requiresSQLCommentHint() overrides kept while DBAL 3 is supported
- Tests: replace removed getMockForAbstractClass() with createStub/createMock, @dataProvider annotations -> attributes (PHPUnit 13), drop unused doctrine/cache + doctrine/annotations dev deps

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Add missing tests: getName(), getSQLDeclaration() (DATETIME(3) + TIMESTAMP version column), convertToDatabaseValue(null), and convertToPHPValue() with an exact 'Y-m-d H:i:s.v' string (createFromFormat success path)
- Exclude the DBAL version-conditional exception factories from coverage: only one branch can ever run for a given installed DBAL major
- Type the test property with the concrete class (adds null-safety assertions required by phpstan)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@fguimier
fguimier merged commit 61d2ab9 into main Jul 16, 2026
5 checks passed
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