Skip to content

Support wrapWhere() from database 2.19#567

Merged
roxblnfk merged 5 commits into
2.xfrom
database-2-18
May 29, 2026
Merged

Support wrapWhere() from database 2.19#567
roxblnfk merged 5 commits into
2.xfrom
database-2-18

Conversation

@roxblnfk

@roxblnfk roxblnfk commented May 28, 2026

Copy link
Copy Markdown
Member

🔍 What was changed

Update database to 2.19.0
Update comment for ScopeInterface

📝 Checklist

  • Closes #
  • How was this tested:
    • Tested manually
    • Unit tests added

📃 Documentation

Copilot AI 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.

Pull request overview

This PR updates cycle/database to 2.18 and documents/tests use of wrapWhere() in ORM scopes to prevent soft-delete scope conditions from being bypassed by user-added orWhere() clauses.

Changes:

  • Bumps cycle/database from ^2.17.0 to ^2.18.0.
  • Adds wrapWhere() to the QueryBuilder docblock proxy API.
  • Expands scope documentation and adds functional coverage plus a wrapped soft-delete scope fixture.

Reviewed changes

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

Show a summary per file
File Description
composer.json Updates the database dependency required for wrapWhere().
src/Select/QueryBuilder.php Documents wrapWhere() as a proxied query-builder method.
src/Select/ScopeInterface.php Adds detailed guidance for scope behavior and wrapWhere() usage.
tests/ORM/Fixtures/NotDeletedWrappedScope.php Adds a test fixture scope that wraps existing WHERE conditions before filtering soft-deleted rows.
tests/ORM/Functional/Driver/Common/Mapper/SoftDeletesTest.php Adds functional tests covering unwrapped bypass behavior, wrapped protection, and no-user-WHERE behavior.

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

Comment thread src/Select/ScopeInterface.php
Comment thread src/Select/QueryBuilder.php
@codecov

codecov Bot commented May 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.59%. Comparing base (abaaa51) to head (0e4476d).

Additional details and impacted files
@@            Coverage Diff            @@
##                2.x     #567   +/-   ##
=========================================
  Coverage     91.59%   91.59%           
- Complexity     2013     2014    +1     
=========================================
  Files           131      131           
  Lines          5223     5226    +3     
=========================================
+ Hits           4784     4787    +3     
  Misses          439      439           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@roxblnfk roxblnfk changed the title Support wrapWhere() from database 2.18 Support wrapWhere() from database 2.19 May 28, 2026
@roxblnfk roxblnfk requested a review from Copilot May 28, 2026 20:09

Copilot AI 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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@roxblnfk roxblnfk merged commit 70677b0 into 2.x May 29, 2026
28 of 31 checks passed
@roxblnfk roxblnfk deleted the database-2-18 branch May 29, 2026 09:53
@roxblnfk roxblnfk added the type:feature New feature. label Jun 2, 2026
@roxblnfk roxblnfk added this to the 2.17.x milestone Jun 2, 2026
@roxblnfk roxblnfk added this to Cycle Jun 2, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Cycle Jun 2, 2026
@github-project-automation github-project-automation Bot moved this to In Progress in Cycle Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature New feature.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants