CI rehearsal only (do not merge) - #20
michael-moffett wants to merge 2 commits into
Conversation
Add `Gate::accepts(Protocol $p): bool` to the PHP SDK. This is the PHP `Gate::accepts` item from issue . The spec (`docs/paykit-interface.md:154-158`) names `accepts(protocol)` as a Gate method in every SDK, and PHP does not have it.
|
| if ($p === Protocol::X402 && $this->hasFees()) { | ||
| return false; | ||
| } | ||
| return $this->accept === null || in_array($p, $this->accept, true); |
There was a problem hiding this comment.
Inherited protocol limits are ignored When a gate has no explicit
accept list, this method returns true for any fee-free protocol without checking Config. With a configuration that accepts only MPP, gate->accepts(Protocol::X402) therefore returns true even though the middleware excludes X402. Callers of this new public method get an admission decision that contradicts the configured protocol limit.
Fork CI only. Do not merge.