ejsmont-artur/php-proxy-builder
Runtime proxy builder for PHP that wraps any object with Advice (AOP-style) to add cross-cutting behavior like caching. Proxies transparently delegate method calls to the target while keeping proxy, advice, and client code fully decoupled.
Proxy::build(MyService::class, [new LogInterceptor()])).@Proxy([new AuthInterceptor()])).Proxy::build(UserRepository::class, [new CacheInterceptor()])).For Executives: "This package lets us add features like logging, security checks, or caching to any PHP class with minimal code—think of it as ‘middleware for your services.’ For example, we could auto-log every database call or enforce rate limits across all API endpoints without touching each class individually. It’s a 10x productivity boost for cross-cutting concerns, reducing technical debt in our microservices and CLI tools. The MIT license is risk-free, and the low dependency count means no vendor lock-in."
For Engineering: *"PHP-Proxy-Builder gives us AOP-like capabilities in pure PHP—no need for external tools like AspectJ. Key benefits:
new CacheInterceptor() for all Repository methods).Proxy::build(StripeService::class, [new TestInterceptor()])).UserService logging use case—if it saves us 2 days on the audit trail feature, it’s a no-brainer."*How can I help you explore Laravel packages today?