Support wrapWhere() from database 2.19#567
Merged
Merged
Conversation
There was a problem hiding this comment.
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/databasefrom^2.17.0to^2.18.0. - Adds
wrapWhere()to theQueryBuilderdocblock 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.
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
2 tasks
wrapWhere() from database 2.18wrapWhere() from database 2.19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔍 What was changed
Update database to 2.19.0
Update comment for
ScopeInterface📝 Checklist
📃 Documentation