Skip to content

Improve interface segregation - #119

Merged
vjik merged 2 commits into
113-interface-segregationfrom
improve-segregation
Aug 5, 2026
Merged

Improve interface segregation#119
vjik merged 2 commits into
113-interface-segregationfrom
improve-segregation

Conversation

@vjik

@vjik vjik commented Aug 5, 2026

Copy link
Copy Markdown
Member

No description provided.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a40ca5fd-faa0-4d75-9b5b-11c7e0f5a3c0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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

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

@codecov

codecov Bot commented Aug 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.93%. Comparing base (23d955b) to head (78ff1f7).

Additional details and impacted files
@@                     Coverage Diff                      @@
##             113-interface-segregation     #119   +/-   ##
============================================================
  Coverage                        95.93%   95.93%           
  Complexity                          79       79           
============================================================
  Files                               10       10           
  Lines                              197      197           
============================================================
  Hits                               189      189           
  Misses                               8        8           

☔ View full report in Codecov by Harness.
📢 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.

Copilot AI 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.

Pull request overview

This PR refactors the authentication contracts to better separate “authenticate only” authenticators from authenticators that also add a failure challenge, and updates middleware/method implementations and docs accordingly.

Changes:

  • Replace ChallengeInterface usage with the new AuthenticatorWithChallengeInterface and update the middleware and composite method logic.
  • Update built-in authentication methods to declare the appropriate authenticator interfaces and document no-op challenges where applicable.
  • Refresh README and changelog entries to reflect the new interface structure and deprecations.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/Middleware/Authentication.php Switches challenge behavior detection to AuthenticatorWithChallengeInterface.
src/Method/QueryParameter.php Declares authenticator interface changes; documents no-op challenge for deprecated contract compatibility.
src/Method/HttpHeader.php Declares authenticator interface changes; documents no-op challenge for deprecated contract compatibility.
src/Method/HttpCookie.php Declares authenticator interface changes; documents no-op challenge for deprecated contract compatibility.
src/Method/HttpBearer.php Updates interface declaration/imports to the new challenge-aware contract.
src/Method/HttpBasic.php Updates interface declaration/imports to the new challenge-aware contract.
src/Method/Composite.php Updates composite challenge handling to rely on AuthenticatorWithChallengeInterface.
src/ChallengeInterface.php Removes the old challenge-only interface.
src/AuthenticatorWithChallengeInterface.php Introduces a new interface for authenticators that also add challenges on failure.
src/AuthenticatorInterface.php Updates docs to steer challenge-capable authenticators to the new interface.
src/AuthenticationMethodInterface.php Re-defines deprecated interface as equivalent to AuthenticatorWithChallengeInterface.
README.md Updates documentation to reference the new interfaces and deprecation guidance.
CHANGELOG.md Notes the interface changes under the current development version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/AuthenticatorWithChallengeInterface.php
Comment thread src/Method/Composite.php
Comment thread src/Method/QueryParameter.php
Comment thread src/Method/HttpHeader.php
Comment thread src/Method/HttpCookie.php
Comment thread src/Method/HttpBearer.php
@vjik
vjik requested a review from samdark August 5, 2026 13:44
@vjik vjik added the status:code review The pull request needs review. label Aug 5, 2026
@vjik
vjik merged commit 698eb79 into 113-interface-segregation Aug 5, 2026
30 checks passed
@vjik
vjik deleted the improve-segregation branch August 5, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status:code review The pull request needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants