Skip to content

Issue/474 stop cleanup - #480

Merged
armanist merged 3 commits into
quantum-php:masterfrom
armanist:issue/474-stop-cleanup
Apr 29, 2026
Merged

armanist merged 3 commits into
quantum-php:masterfrom
armanist:issue/474-stop-cleanup

Conversation

@armanist

@armanist armanist commented Apr 29, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #474

Summary by CodeRabbit

Release Notes

  • Breaking Changes

    • Removed the stop() helper function; use alternative methods for execution control.
    • Removed exception class previously used for execution termination.
  • Refactor

    • Simplified application execution flow and exception handling mechanisms.

@coderabbitai

coderabbitai Bot commented Apr 29, 2026 •

Copy link
Copy Markdown

Warning

Rate limit exceeded

@armanist has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 40 minutes and 45 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9b2500a8-d0d3-4e23-a591-b3c02e651861

📥 Commits

Reviewing files that changed from the base of the PR and between 3561408 and a93f969.

📒 Files selected for processing (1)
  • tests/Unit/Http/Helpers/HttpHelperTest.php
📝 Walkthrough

Walkthrough

Removes StopExecutionException exception class and stop() helper function previously used as control flow primitives. Updates test assertions to eliminate try/catch exception suppression. Adds documentation and private constructor to ExitCode class.

Changes

Cohort / File(s) Summary
Exception Removal
src/App/Exceptions/StopExecutionException.php
Deleted exception class and its static executionTerminated() factory method that previously enabled exception-based control flow termination.
Helper Function Removal
src/App/Helpers/app.php
Deleted stop() helper function and its StopExecutionException import that wrapped closure execution and exception throwing.
Test Updates
tests/Unit/Http/Helpers/HttpHelperTest.php
Removed try/catch blocks and StopExecutionException import; test assertions now directly invoke redirect helpers without exception suppression.
Documentation & Instantiation Prevention
src/App/Enums/ExitCode.php
Added file-level framework docblock and @codeCoverageIgnore class docblock; introduced private constructor to prevent class instantiation while preserving constants.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

enhancement

Suggested reviewers

  • andrey-smaelov

Poem

🐰 The exceptions have hopped away,
No more stop() calls to delay,
Control flows clear, direct, and bright,
The code now runs just right! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Issue/474 stop cleanup' is directly related to the main objective of the PR, which involves cleaning up stop() usage and narrowing StopExecutionException as described in issue #474.
Linked Issues check ✅ Passed The PR successfully removes StopExecutionException, deletes the stop() helper function, and updates tests to eliminate stop()-based control flow, directly meeting all coding requirements from issue #474.
Out of Scope Changes check ✅ Passed All changes are within scope: StopExecutionException removal, stop() helper deletion, ExitCode documentation, and test updates directly address issue #474 objectives without introducing unrelated modifications.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 40 minutes and 45 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov

codecov Bot commented Apr 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.19%. Comparing base (d8da24e) to head (a93f969).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #480      +/-   ##
============================================
+ Coverage     83.11%   83.19%   +0.07%     
+ Complexity     2904     2903       -1     
============================================
  Files           251      249       -2     
  Lines          7658     7651       -7     
============================================
  Hits           6365     6365              
+ Misses         1293     1286       -7     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@armanist armanist added the enhancement New feature or request label Apr 29, 2026
@armanist armanist added this to the 3.0.0 milestone Apr 29, 2026

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/App/Enums/ExitCode.php`:
- Around line 19-21: The docblock for class ExitCode has an incorrect `@package`
annotation; update the `@package` value to match the declared namespace
(Quantum\App\Enums) in the ExitCode class docblock so the annotation aligns with
the namespace and class location.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 2c759430-661a-4a69-bbee-172b851f5e68

📥 Commits

Reviewing files that changed from the base of the PR and between d8da24e and 3561408.

📒 Files selected for processing (4)
  • src/App/Enums/ExitCode.php
  • src/App/Exceptions/StopExecutionException.php
  • src/App/Helpers/app.php
  • tests/Unit/Http/Helpers/HttpHelperTest.php
💤 Files with no reviewable changes (2)
  • src/App/Exceptions/StopExecutionException.php
  • src/App/Helpers/app.php

Comment thread src/App/Enums/ExitCode.php
@armanist
armanist requested a review from andrey-smaelov April 29, 2026 09:16
} catch (StopExecutionException $e) {

}
redirect('/home');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Since the redirect() or the redirectWith() now returns response the test must be justified accordingly

@armanist
armanist requested a review from andrey-smaelov April 29, 2026 09:36
@armanist
armanist merged commit b4577ba into quantum-php:master Apr 29, 2026
7 checks passed
@armanist
armanist deleted the issue/474-stop-cleanup branch April 29, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clean up remaining stop() usage and narrow StopExecutionException

2 participants