-
Notifications
You must be signed in to change notification settings - Fork 498
Sail Plugins #777
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sail Plugins #777
Conversation
e5c07cf
to
4d6ba7a
Compare
Thanks for your pull request to Laravel! Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include. If applicable, please consider releasing your code as a package so that the community can still take advantage of your contributions! |
@taylorotwell , with so much effort put in, you’d expect more than a bot-like response. With due respect, it wouldn’t be frustrating and disresepctful if just five minutes were spent reading the PR description before closing it — a tiny fraction of the time I invested to present it. |
Add Plugin System to Laravel Sail for Extensible Docker Customization
Motivation and Problem
Laravel Sail currently requires direct codebase updates to support new services or runtime variations, such as adding specialized servers or tweaking existing ones like
mysql
orredis
. As community demands grow, this approach increases maintenance overhead and bloats the core package with niche or non-essential features. This is evident from closed PRs trying to add new services or expand functionality, highlighting the challenge of balancing varied community requests.Overview of the Plugin System
This PR introduces a plugin system that allows third-party packages to extend Sail’s Docker environment. Plugins can:
mysql
orredis
configurations).End developers can opt into plugins on-demand, tailoring their Docker setup while keeping Sail’s base minimal. See the documentation PR for implementation details and examples.
Why Build This Into Sail Rather Than a Standalone Tool?
I understand that the package maintainers aim to keep Sail simple and maintainable, as evidenced by closed PRs seeking to expand functionality, often accompanied by suggestions to fork the library instead. However, keeping this in a fork would defeat the proposal’s purpose, which is to prevent ecosystem fragmentation and spare developers the burden of managing separate Sail forks for their custom needs. The plugin system keeps Sail’s core behavior intact while enabling third-party packages to extend it externally, preserving a consistent and lightweight default experience.
How This Reduces Maintenance Overhead for Sail?
By offloading specialized or niche services to third-party plugins, Sail’s core remains focused on a reliable, streamlined Docker foundation. This reduces the need for frequent updates to accommodate every community request, as external packages can handle their own upkeep. Sail stays lean, maintainable, and adaptable without growing unwieldy.
Try It Out: Demo Plugin
To see the plugin system in action, check out this demo plugin: laravel-sail-plugin-demo. Try running
php artisan sail:install
in this sample Laravel project using the demo plugin: laravel-template (sail-plugin branch).