Skip to content

Release 17.1.0#1173

Merged
oat-devops merged 10 commits intomasterfrom
release-17.1.0
Feb 26, 2026
Merged

Release 17.1.0#1173
oat-devops merged 10 commits intomasterfrom
release-17.1.0

Conversation

@oat-devops
Copy link
Copy Markdown

@oat-devops oat-devops commented Feb 26, 2026

Release 17.1.0 from 17.0.0

Summary by CodeRabbit

  • Chores
    • Updated database persistence layer to use modern query result handling methods
    • Added PHP 8.1+ version constraint to project requirements
    • Improved type hints and return type declarations across database operations
    • Enhanced test infrastructure with better error handling and environment detection guards
    • Simplified database exception handling across multiple modules

@oat-devops oat-devops merged commit 0faafc6 into master Feb 26, 2026
4 of 5 checks passed
@oat-devops oat-devops deleted the release-17.1.0 branch February 26, 2026 08:53
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 26, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info

Configuration used: Path: https://raw.githubusercontent.com/oat-sa/tao-code-quality/main/coderabbit/php/authoring/v1/.coderabbit.yaml (via .coderabbit.yaml)

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 60042fb and cddd590.

📒 Files selected for processing (30)
  • common/oatbox/filesystem/FileSystemService.php
  • common/oatbox/log/logger/TaoMonolog.php
  • common/persistence/class.SqlKvDriver.php
  • common/persistence/class.SqlPersistence.php
  • common/persistence/sql/class.Platform.php
  • common/persistence/sql/class.QueryIterator.php
  • common/persistence/sql/dbal/class.Driver.php
  • common/persistence/sql/interface.Driver.php
  • common/uri/class.MicrotimeUriProvider.php
  • composer.json
  • core/kernel/api/class.ModelExporter.php
  • core/kernel/api/class.ModelFactory.php
  • core/kernel/classes/class.DbWrapper.php
  • core/kernel/impl/class.ApiModelOO.php
  • core/kernel/persistence/smoothsql/class.Class.php
  • core/kernel/persistence/smoothsql/class.Resource.php
  • core/kernel/persistence/smoothsql/search/GateWay.php
  • core/kernel/persistence/smoothsql/search/TaoResultSet.php
  • core/kernel/uri/MicrotimeRandUriProvider.php
  • core/kernel/uri/class.DatabaseSerialUriProvider.php
  • core/resource/ResourceCollection.php
  • scripts/tools/CleanUpOrphanFiles.php
  • test/integration/RdfExportTest.php
  • test/integration/common/persistence/sql/UpdateMultipleTestAbstract.php
  • test/integration/common/persistence/sql/dbal/DriverTest.php
  • test/integration/helpers/FileSerializerMigrationHelperTest.php
  • test/integration/model/persistence/starsql/ClassTest.php
  • test/unit/core/DependencyInjection/ContainerBuilderTest.php
  • test/unit/extension/ComposerInfoTest.php
  • test/unit/model/persistence/smoothsql/SmoothModelIteratorTest.php

📝 Walkthrough

Walkthrough

This pull request migrates the codebase from DBAL 2 to DBAL 3. Changes include: updating fetch() and fetchAll() calls to fetchAssociative() and fetchAllAssociative(), refactoring exception imports from Doctrine\DBAL\DBALException to Doctrine\DBAL\Exception, adding explicit type hints and return types to method signatures, and establishing PHP 8.1 as the minimum version requirement.

Changes

Cohort / File(s) Summary
DBAL Exception Import Updates
common/persistence/sql/class.Platform.php, core/kernel/impl/class.ApiModelOO.php, test/integration/common/persistence/sql/dbal/DriverTest.php
Updated exception imports from Doctrine\DBAL\DBALException to Doctrine\DBAL\Exception aliased as DBALException; all catch blocks and docblocks reference the new alias.
Fetch Method Migrations (Core Persistence)
common/persistence/class.SqlKvDriver.php, common/persistence/sql/class.QueryIterator.php, common/uri/class.MicrotimeUriProvider.php
Replaced fetch() with fetchAssociative() and updated loop conditions to explicitly check !== false instead of relying on truthiness; preserves logic while adapting to DBAL 3 API.
Fetch Method Migrations (Kernel)
core/kernel/api/class.ModelExporter.php, core/kernel/api/class.ModelFactory.php, core/kernel/persistence/smoothsql/class.Class.php, core/kernel/persistence/smoothsql/class.Resource.php, core/kernel/uri/MicrotimeRandUriProvider.php, core/kernel/uri/class.DatabaseSerialUriProvider.php, core/resource/ResourceCollection.php, scripts/tools/CleanUpOrphanFiles.php, test/integration/RdfExportTest.php, test/integration/common/persistence/sql/UpdateMultipleTestAbstract.php
Replaced fetch()/fetchAll() with fetchAssociative()/fetchAllAssociative(); updated all loops and result handling to work with associative arrays; removed explicit closeCursor() calls.
DBAL Result Type Declarations
common/persistence/class.SqlPersistence.php, common/persistence/sql/dbal/class.Driver.php, common/persistence/sql/interface.Driver.php
Updated return types and imports to use Doctrine\DBAL\Result instead of Statement/ResultStatement; added string type hint for $statement parameter; updated docblocks to reflect new return types.
GateWay DBAL 2 Support Removal
core/kernel/persistence/smoothsql/search/GateWay.php
Removed DBAL 2 compatibility path by deleting Statement import and type union; simplified statementToArray() signature to accept only Result; removed version checks in fetchQuery().
Iterator & Countable Return Types
core/kernel/persistence/smoothsql/search/TaoResultSet.php, core/kernel/classes/class.DbWrapper.php
Added explicit return type hints (mixed, int, void) to iterator interface methods and database utility methods; refactored getRowCount() to use fetchOne() directly.
Test Infrastructure Updates
test/integration/helpers/FileSerializerMigrationHelperTest.php, test/integration/model/persistence/starsql/ClassTest.php, test/unit/core/DependencyInjection/ContainerBuilderTest.php, test/unit/extension/ComposerInfoTest.php, test/unit/model/persistence/smoothsql/SmoothModelIteratorTest.php
Added test skipping guards for missing dependencies (vfsStream, neo4j persistence); updated test mocking from PDOStatement to Doctrine\DBAL\Result; added static cache reset helper for ComposerInfoTest.
Configuration & Constants
composer.json, common/oatbox/filesystem/FileSystemService.php, common/oatbox/log/logger/TaoMonolog.php
Added PHP 8.1 version constraint; exposed FLYSYSTEM_LOCAL_ADAPTER constant; formatting adjustment in TaoMonolog.
Parameter Binding Updates
test/integration/common/persistence/sql/UpdateMultipleTestAbstract.php
Changed parameter placeholder binding from colon-prefixed format (':value_1') to plain keys ('value_1') in prepared statements.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

  • fix: update dependencies for dbal v3 #1172: Applies identical DBAL v2-to-v3 migration pattern including fetch method replacements, exception import updates, and method signature refinements across a related codebase.

Suggested labels

⏱️ 60+ Min Review

Suggested reviewers

  • bartlomiejmarszal
  • KirylHatalski
  • pnal
  • Karol-Stelmaczonek
✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch release-17.1.0

Tip

Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs).
Share your feedback on Discord.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to 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