Skip to content

Extract ResolvesCallbackArguments trait, enable in AuthBasic#177

Merged
alganet merged 1 commit intoRespect:masterfrom
alganet:auth-basic-psr7
Mar 20, 2026
Merged

Extract ResolvesCallbackArguments trait, enable in AuthBasic#177
alganet merged 1 commit intoRespect:masterfrom
alganet:auth-basic-psr7

Conversation

@alganet
Copy link
Member

@alganet alganet commented Mar 20, 2026

The duplicated resolveCallbackArguments() method in AbstractRoute and AbstractSyncedRoutine is extracted into a shared trait. AuthBasic now uses the trait so its callback can type-hint ServerRequestInterface to conditionally skip auth based on HTTP method (e.g. allow reads, require credentials for writes). Backward compatible — existing callbacks without PSR-7 hints behave identically.

The duplicated resolveCallbackArguments() method in AbstractRoute and
AbstractSyncedRoutine is extracted into a shared trait. AuthBasic now
uses the trait so its callback can type-hint ServerRequestInterface to
conditionally skip auth based on HTTP method (e.g. allow reads, require
credentials for writes). Backward compatible — existing callbacks without
PSR-7 hints behave identically.
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.91%. Comparing base (56231a7) to head (3a953b6).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #177      +/-   ##
============================================
- Coverage     96.91%   96.91%   -0.01%     
  Complexity      437      437              
============================================
  Files            32       33       +1     
  Lines          1103     1101       -2     
============================================
- Hits           1069     1067       -2     
  Misses           34       34              

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

@alganet alganet marked this pull request as ready for review March 20, 2026 03:25
@alganet alganet merged commit 74fd050 into Respect:master Mar 20, 2026
3 checks passed
@alganet alganet deleted the auth-basic-psr7 branch March 20, 2026 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants