casbin/psr3-bridge
Integrates Casbin's PHP enforcement library with any PSR-3 compatible logger. This bridge adapts PSR-3 loggers to Casbin's logger interface, letting you route authorization decisions, policy loading, and role manager events into your existing logging stack.
Consider it when:
php-casbin and have a PSR-3-compatible logger as the house standard (nearly all modern PHP/Laravel apps do).Look elsewhere or skip it when:
For executives: This is a small, low-cost piece of plumbing that makes our authorization system observable. It doesn't add a customer-facing feature, but it converts "a user says they can't access something" from an engineering investigation into a log query, and it gives us a defensible record of access decisions for compliance reviews. Effort is negligible; the risk is that the package itself is a nearly-unmaintained open-source shim, so we should copy its small amount of code into our own repository and own it rather than depend on it. Net: low cost, reduced operational and compliance risk, no roadmap impact.
For engineering: It's a single adapter implementing Casbin's logger interface and delegating to Psr\Log\LoggerInterface; Apache-2.0 means we can vendor it with attribution in under an hour. Recommendation: don't add a 2-star, zero-dependent, 2022-era package to the dependency graph — reimplement or vendor, wire it into the existing log channel, tag Casbin entries with a stable context key (user, resource, action, decision, policy version) so they're queryable, and gate per-request debug logging behind a config flag to control volume.
How can I help you explore Laravel packages today?