sylius/registry
Sylius Registry component provides a simple service registry to store, retrieve, and manage services by type and name. Useful for decoupling implementations, selecting handlers at runtime, and organizing extensible systems in Symfony/Laravel-style PHP apps.
PaymentGatewayInterface) without tight coupling.League\Container or Laravel’s app()->tag() instead).app()->bindWhen(), app()->tag(), or Pimple for more features.spatie/laravel-package-tools) for standardized plugin architectures.For Executives: "This package lets us plug in services like Lego blocks—think payment processors, analytics tools, or even experimental features—without rewriting core systems. It’s used by Sylius (a leader in e-commerce) and is MIT-licensed, so no legal risks. For example, we could let third-party vendors add their own shipping methods to our platform without touching our codebase. It’s a low-risk, high-reward way to make our system more flexible and future-proof."
For Engineering:
*"The ServiceRegistry gives us a simple, interface-driven way to manage services at runtime. Here’s why it’s useful:
PaymentGatewayInterface), so we avoid circular dependencies or tight coupling.NotificationChannel without us knowing about it upfront.register(), get(), and has()—no DI container needed unless you want to integrate it.Tradeoffs:
Perfect for: Plugin systems, dynamic feature flags, or any case where services need to be swapped at runtime."*
How can I help you explore Laravel packages today?