docs/guides/auth.md:30 constructs new BearerAuth('secret', principal: 'alice'), but src/Auth/BearerAuth.php:17 expects one array argument mapping tokens to principals. The custom verifier example in docs/guides/auth.md:33 implements scheme() even though src/Auth/AuthScheme.php:20 requires name(), and it calls AuthResult::accepted() and AuthResult::rejected() even though the actual factories are AuthResult::accept() and AuthResult::reject().
This guide is likely to be copied by users configuring authentication, and the examples fail before they demonstrate the intended extension point. It also conflicts with the public auth interfaces and with the current unit tests.
Fix prompt: Rewrite the auth guide examples against the current API. Show new BearerAuth(['secret' => 'alice']), implement AuthScheme::name() in the custom verifier, use AuthResult::accept() and AuthResult::reject(), and add a docs snippet smoke test or embed the example in a small sample so future interface renames are caught automatically.
docs/guides/auth.md:30constructsnew BearerAuth('secret', principal: 'alice'), butsrc/Auth/BearerAuth.php:17expects one array argument mapping tokens to principals. The custom verifier example indocs/guides/auth.md:33implementsscheme()even thoughsrc/Auth/AuthScheme.php:20requiresname(), and it callsAuthResult::accepted()andAuthResult::rejected()even though the actual factories areAuthResult::accept()andAuthResult::reject().This guide is likely to be copied by users configuring authentication, and the examples fail before they demonstrate the intended extension point. It also conflicts with the public auth interfaces and with the current unit tests.
Fix prompt: Rewrite the auth guide examples against the current API. Show
new BearerAuth(['secret' => 'alice']), implementAuthScheme::name()in the custom verifier, useAuthResult::accept()andAuthResult::reject(), and add a docs snippet smoke test or embed the example in a small sample so future interface renames are caught automatically.