Skip to content

Conversation

Tigrov
Copy link
Member

@Tigrov Tigrov commented Jun 12, 2025

Merge it before release 2.0

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

@Tigrov Tigrov added the type:docs Documentation label Jun 12, 2025
Copy link

codecov bot commented Jun 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.40%. Comparing base (f7475e5) to head (2309308).

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #987   +/-   ##
=========================================
  Coverage     98.40%   98.40%           
  Complexity     1640     1640           
=========================================
  Files           117      117           
  Lines          4335     4335           
=========================================
  Hits           4266     4266           
  Misses           69       69           

☔ 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.

@samdark samdark requested a review from Copilot June 12, 2025 21:36
Copy link

@Copilot 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

This PR updates tests and documentation to use the new $db->select() method instead of instantiating queries with new Query($db), and removes now-unnecessary use Yiisoft\Db\Query\Query imports.

  • Replace all new Query($db) calls with $db->select().
  • Remove redundant use Yiisoft\Db\Query\Query statements from tests.
  • Update code examples in docs and README to match the new API.

Reviewed Changes

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

Show a summary per file
File Description
tests/Db/Query/QueryTest.php Switched query instantiation to $db->select()
tests/Db/Expression/StructuredExpressionBuilderTest.php Updated expression builder test to use $db->select()
tests/Db/Expression/JsonExpressionBuilderTest.php Updated expression builder test to use $db->select()
tests/Db/Expression/ArrayExpressionBuilderTest.php Updated expression builder test to use $db->select()
tests/Common/CommonCommandTest.php Replaced new Query($db) with $db->select() in assertions
tests/AbstractConnectionTest.php Updated batch query result creation to use $db->select()
src/Query/QueryInterface.php Updated doc example to use $db->select()
docs/guide/pt-BR/query/with-query.md Changed example to use $db->select()
docs/guide/pt-BR/query/where.md Changed example to use $db->select()
docs/guide/pt-BR/query/union.md Changed example to use $db->select()
docs/guide/pt-BR/query/select.md Changed example to use $db->select()
docs/guide/pt-BR/query-builder.md Changed example to use $db->select()
docs/guide/en/schema/typecasting.md Changed example to use $db->select()
docs/guide/en/query/with-query.md Changed example to use $db->select()
docs/guide/en/query/where.md Changed example to use $db->select()
docs/guide/en/query/union.md Changed example to use $db->select()
docs/guide/en/query/select.md Changed example to use $db->select()
docs/guide/en/query-builder.md Changed example to use $db->select()
README.md Updated sample usage to use $db->select()

Tigrov and others added 2 commits June 13, 2025 11:47
@Tigrov Tigrov added the status:ready for merge The pull request is OK to be merged. label Jun 13, 2025
@samdark
Copy link
Member

samdark commented Aug 12, 2025

@Tigrov time to update/merge it?

@Tigrov
Copy link
Member Author

Tigrov commented Aug 13, 2025

Before release 2.0
It changes doc and it will not be valid for the current stable version.

Tigrov and others added 2 commits September 11, 2025 16:23
# Conflicts:
#	tests/AbstractConnectionTest.php
#	tests/Db/Expression/Value/Builder/ArrayValueBuilderTest.php
#	tests/Db/Expression/Value/Builder/JsonValueBuilderTest.php
#	tests/Db/Expression/Value/Builder/StructuredValueBuilderTest.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready for merge The pull request is OK to be merged. type:docs Documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants