Skip to content

feat: update dependencies for dbal3 - #196

Merged
tikhanovichA merged 2 commits into
developfrom
feat/update-dependency-2
Feb 26, 2026
Merged

feat: update dependencies for dbal3#196
tikhanovichA merged 2 commits into
developfrom
feat/update-dependency-2

Conversation

@tikhanovichA

@tikhanovichA tikhanovichA commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

Update dbal v3 dependencies AUT-4457

Summary by CodeRabbit

  • Refactor
    • Updated internal database interaction layer to a newer API, improving reliability and maintainability.
    • Standardized error handling by using common exception types.
    • Behavior and public interfaces remain unchanged; no user-visible functional changes.

@coderabbitai

coderabbitai Bot commented Feb 25, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Replace deprecated Doctrine DBAL query/fetch methods with modern equivalents across several brokers and repositories; and swap a Doctrine InvalidArgument import for the core InvalidArgumentException. No public signatures were changed. (44 words)

Changes

Cohort / File(s) Summary
Queue Brokers
model/QueueBroker/NewSqlQueueBroker.php, model/QueueBroker/RdsQueueBroker.php
Replaced DBAL calls: execute()executeQuery()/executeStatement(), fetchColumn()fetchOne(), fetchAll()fetchAllAssociative(), fetch()fetchAssociative(). Removed use of FetchMode. Logic and flow preserved.
Task Query
model/Repository/StuckTaskQuery.php
Replaced use Doctrine\Common\Cache\Psr6\InvalidArgument; with use InvalidArgumentException; and updated thrown exceptions to InvalidArgumentException in constructor validation.
Task Log Broker
model/TaskLogBroker/RdsTaskLogBroker.php
Systematic replacement of DBAL primitives across methods: execute()executeStatement()/executeQuery(), fetchColumn()fetchOne(), fetchAll()fetchAllAssociative(), fetch()fetchAssociative(). No signature changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

⏱️ ~20 Min Review

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 63.64% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: update dependencies for dbal3' directly and clearly summarizes the main change: updating DBAL v3 dependencies. It aligns with the PR objectives and the changeset modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 feat/update-dependency-2

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

@github-actions

github-actions Bot commented Feb 25, 2026

Copy link
Copy Markdown

Front-end summary Node 18

💯 Total ✅ Passed ⏭️ Skipped ❌ Failed
115 115 0 0

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@model/TaskLogBroker/RdsTaskLogBroker.php`:
- Around line 327-329: The code calls $qb->executeQuery()->fetchAssociative()
and passes its result directly to TasksLogsStats::buildFromArray(), but
fetchAssociative() can return false; update the RdsTaskLogBroker code to check
the result ($row) and handle the no-row case before calling
TasksLogsStats::buildFromArray(): if $row === false return a sensible fallback
(e.g., null) or call buildFromArray with an empty array, otherwise call
TasksLogsStats::buildFromArray($row).

ℹ️ 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 49d21c3 and e451670.

📒 Files selected for processing (4)
  • model/QueueBroker/NewSqlQueueBroker.php
  • model/QueueBroker/RdsQueueBroker.php
  • model/Repository/StuckTaskQuery.php
  • model/TaskLogBroker/RdsTaskLogBroker.php

Comment thread model/TaskLogBroker/RdsTaskLogBroker.php Outdated
@github-actions

Copy link
Copy Markdown

Version

Target Version 6.10.0
Last version 6.9.5

There are 0 BREAKING CHANGE, 1 feature, 1 fix

@tikhanovichA
tikhanovichA requested review from a team, Karol-Stelmaczonek, KirylHatalski, bartlomiejmarszal and pnal and removed request for a team February 25, 2026 16:19

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
model/TaskLogBroker/RdsTaskLogBroker.php (1)

372-377: Replace deprecated DBAL array parameter constant with ArrayParameterType enum.

The constant Connection::PARAM_STR_ARRAY is deprecated in Doctrine DBAL 3.x. Replace with ArrayParameterType::STRING for forward compatibility.

Proposed change
+use Doctrine\DBAL\ArrayParameterType;
 ...
-                ->setParameter('id', $collection->getIds(), \Doctrine\DBAL\Connection::PARAM_STR_ARRAY)
+                ->setParameter('id', $collection->getIds(), ArrayParameterType::STRING)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@model/TaskLogBroker/RdsTaskLogBroker.php` around lines 372 - 377, Replace the
deprecated Connection::PARAM_STR_ARRAY usage in the setParameter call within
RdsTaskLogBroker (where self::COLUMN_ID is bound) with the DBAL
ArrayParameterType enum: change the third argument to ArrayParameterType::STRING
and add the appropriate use/import for
Doctrine\DBAL\ParameterType\ArrayParameterType; keep the rest of the
setParameter call and surrounding query builder logic intact so only the
parameter type constant is updated.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@model/TaskLogBroker/RdsTaskLogBroker.php`:
- Around line 372-377: Replace the deprecated Connection::PARAM_STR_ARRAY usage
in the setParameter call within RdsTaskLogBroker (where self::COLUMN_ID is
bound) with the DBAL ArrayParameterType enum: change the third argument to
ArrayParameterType::STRING and add the appropriate use/import for
Doctrine\DBAL\ParameterType\ArrayParameterType; keep the rest of the
setParameter call and surrounding query builder logic intact so only the
parameter type constant is updated.

ℹ️ 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 e451670 and 9d70cbc.

📒 Files selected for processing (1)
  • model/TaskLogBroker/RdsTaskLogBroker.php

@tikhanovichA
tikhanovichA merged commit 5987757 into develop Feb 26, 2026
6 checks passed
@tikhanovichA
tikhanovichA deleted the feat/update-dependency-2 branch February 26, 2026 10:23
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