laravel / sail

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

[1.x] Install "mariadb-client" package for MariaDB users #693

Closed staudenmeir closed 4 months ago

staudenmeir commented 4 months ago

This PR is related to https://github.com/laravel/framework/pull/51355: We need to switch the MariaDB's driver dump binary from mysqldump to mariadb-dump at some point as MariaDB will remove its support for mysqldump. The issue is that Sail doesn't support mariadb-dump yet.

I looked into using the dump binaries from the actual mysql/mariadb containers, but that's a nightmare.

Instead, my suggestion is to install the mariadb-client package instead of mysql-client in the app container when the MariaDB service is requested. This package provides the necessary mariadb-dump binary.

As discussed with @driesvints in the other PR, we should only switch to mariadb-dump in Laravel 12 and this PR prepares Sail for that switch. I only adjusted the Dockerfile for PHP 8.3 as I assumed that Laravel 12 will drop support for PHP 8.2.

I don't see any breaking changes for Sail users:

@driesvints What do you think about this approach?

github-actions[bot] commented 4 months ago

Thanks for submitting a PR!

Note that draft PR's are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

driesvints commented 4 months ago

I like this approach @staudenmeir, nice work!