feat: update dependencies for dbal3 - #196
Conversation
📝 WalkthroughWalkthroughReplace 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
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
Front-end summary Node 18
|
There was a problem hiding this comment.
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.
📒 Files selected for processing (4)
model/QueueBroker/NewSqlQueueBroker.phpmodel/QueueBroker/RdsQueueBroker.phpmodel/Repository/StuckTaskQuery.phpmodel/TaskLogBroker/RdsTaskLogBroker.php
Version
There are 0 BREAKING CHANGE, 1 feature, 1 fix |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
model/TaskLogBroker/RdsTaskLogBroker.php (1)
372-377: Replace deprecated DBAL array parameter constant with ArrayParameterType enum.The constant
Connection::PARAM_STR_ARRAYis deprecated in Doctrine DBAL 3.x. Replace withArrayParameterType::STRINGfor 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.
📒 Files selected for processing (1)
model/TaskLogBroker/RdsTaskLogBroker.php
Update dbal v3 dependencies AUT-4457
Summary by CodeRabbit