Skip to content

Add return value to QueryBuilder::executeResetSequence()#20765

Open
WarLikeLaux wants to merge 5 commits intoyiisoft:masterfrom
WarLikeLaux:add-executeResetSequence-return
Open

Add return value to QueryBuilder::executeResetSequence()#20765
WarLikeLaux wants to merge 5 commits intoyiisoft:masterfrom
WarLikeLaux:add-executeResetSequence-return

Conversation

@WarLikeLaux
Copy link
Copy Markdown
Contributor

Q A
Is bugfix?
New feature?
Breaks BC?
Fixed issues #20056

What does this PR do?

QueryBuilder::executeResetSequence() and its Oracle override don't return the result of execute(), so Command::executeResetSequence() always returns null. This PR adds the missing return so callers get the affected row count (int).

Continues #20056 (approved by bizley, samdark, Arhell but never merged). This PR extends the fix to oci\QueryBuilder, adds @return PHPDoc to all 3 methods, and adds a test.

Changes

  • Add missing return in QueryBuilder::executeResetSequence() and oci\QueryBuilder::executeResetSequence()
  • Add @return int PHPDoc to all 3 methods (QueryBuilder, oci\QueryBuilder, Command)

Tests

CommandTest (1 test, 2 assertions): return type check for executeResetSequence() with auto and explicit value.

@WarLikeLaux WarLikeLaux marked this pull request as ready for review March 3, 2026 17:45
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.15%. Comparing base (5bfd413) to head (dfd9924).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #20765   +/-   ##
=========================================
  Coverage     80.15%   80.15%           
  Complexity    11536    11536           
=========================================
  Files           374      374           
  Lines         30213    30213           
=========================================
  Hits          24218    24218           
  Misses         5995     5995           

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds the missing return value propagation for executeResetSequence() so callers of Command::executeResetSequence() receive the affected-row count (as returned by Command::execute()), aligning behavior across base and Oracle query builders.

Changes:

  • Return the result of execute() from QueryBuilder::executeResetSequence() and oci\QueryBuilder::executeResetSequence().
  • Document @return int for executeResetSequence() in QueryBuilder and Command.
  • Add a test asserting Command::executeResetSequence() returns an int.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/framework/db/CommandTest.php Adds a test to ensure executeResetSequence() returns an integer for implicit/explicit values.
framework/db/oci/QueryBuilder.php Returns the execute() result from the Oracle reset-sequence implementation.
framework/db/QueryBuilder.php Returns the execute() result and documents @return int.
framework/db/Command.php Documents @return int for Command::executeResetSequence().
framework/CHANGELOG.md Adds changelog entry for the enhancement.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants