laravel / sail

Docker files for running a basic Laravel application.
https://laravel.com/docs/sail
MIT License
1.65k stars 470 forks source link

Feature: add support for phpmyadmin #700

Closed tommitchelmore closed 2 months ago

tommitchelmore commented 2 months ago

This pull request proposes the addition of phpMyAdmin to Laravel Sail.

To achieve this, stubs/phpmyadmin.stub has been created which contains a standard implementation that will work out of the box assuming mysql has been selected.

Additionally, InteractsWithDockerComposeServices has been modified to add phpmyadmin to the protected $services array.

Currently, at work, we add phpMyAdmin manually to every project using Laravel Sail - and have long wondered if it was something that belongs within the installer. The benefit of this to end users is essentially in time; by having it installed out of the box, we remove the need to revisit old projects to find an old pma entry.

The obvious critique is that a new user may not realise that phpMyAdmin won't work with, say, MariaDB out of the box. I suspect checking for this and modifying the stub as required wouldn't be too complicated, but wanted to at least check in here before I go to that length!

taylorotwell commented 2 months ago

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!