Repository navigation
Add run(), translate any Throwable, skip redundant SET in within() (0.2.0) - #9
Conversation
|
Sorry @rasuvaeff, you've used your own review budget of 250,000 diff characters for the last 7 days. You can request another review in 5 days and 23 hours by commenting |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Reviewer's GuideAPIAdd the public dialect-independent
ImplementationUse
ConfigurationRequire the context-library release that provides
DocumentationDocument the new execution helper, Throwable-chain translation, and stricter-session optimization in the changelog and user guides, including the updated yiisoft/db recipe.
TestsUpdate the yiisoft/db integration recipe and add or adjust tests for
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Wave 2 of the 2026-11-20 code-quality review. Requires
rasuvaeff/context^0.5 (usesContext::budgetMs()instead of the private copy of the rule).StatementTimeout::run(string $sql, Context $context, callable(string): T $execute): T: MySQL/MariaDB →$execute(apply($sql)), PostgreSQL →within(fn => $execute($sql)), unsupported →$sqlunchanged. The yiisoft/db README recipe (executed byYiisoftDbIntegrationTeston MySQL, MariaDB, PostgreSQL indatabase-integration) now uses it (Add a dialect-independentStatementTimeout::run()#3).translate()takes any\Throwableand finds thePDOExceptionin thepreviouschain; the result has the given error asprevious. Widening a parameter of a final class is BC-safe (StatementTimeout::translate()should accept any Throwable and find the PDOException in the chain #4).within()skips both theSETand the restore when the session already has a stricter limit (one round trip instead of three); the FakePdo sequence tests are updated as the issue anticipated, plus a case just below the budget rounded up and a native-float restore (within()issues redundant SET and restore statements when the previous limit is stricter #5).#6stays open on purpose (needs an owner decision).Local mutation (
--with-uncovered,zend.assertions=-1): MSI ~92.6% (gate 88). Lazy rollouts: none needed.Fixes #3
Fixes #4
Fixes #5
Summary by Sourcery
Provide unified statement-timeout execution and more efficient, wrapper-aware timeout handling across supported database dialects.
New Features:
Bug Fixes:
Enhancements:
Build:
Documentation:
Tests: