Skip to content

fix: MySQL readiness probe, dump bridge on legacy PHP, and PHP 7.2 image build#406

Merged
geodro merged 3 commits into
mainfrom
chore/release-v1.21.2
May 22, 2026
Merged

fix: MySQL readiness probe, dump bridge on legacy PHP, and PHP 7.2 image build#406
geodro merged 3 commits into
mainfrom
chore/release-v1.21.2

Conversation

@geodro

@geodro geodro commented May 22, 2026

Copy link
Copy Markdown
Owner

Forward-port of the v1.21.2 hotfix to main. v1.21.2 was cut and released from the v1.21.1 tag; this merges chore/release-v1.21.2 into main so the 1.22 line carries the same three fixes plus the [1.21.2] changelog entry. version.go stays at 1.22.0-beta.1 since no new release is cut here, and the [1.21.2] changelog section is slotted under [1.22.0-beta.1].

The MySQL readiness probe ran mysqladmin with no host and fell back to the Unix socket, so on images whose socket is not at /var/run/mysqld/mysqld.sock it failed for the full 30 second timeout and warned could not start mysql before every PHP command even though the server was healthy. It now forces IPv4 loopback TCP, which is independent of the image's socket path and stays correct inside the container on macOS and IPv6-only host networks. The mysql service-migration probe, dump, and restore commands force TCP the same way.

The dump() and dd() bridge that lerd installs as an auto_prepend_file used match, mixed and never type declarations, str_contains, str_ends_with, and array_key_first, none of which parse on PHP 7.4 and several not on 8.0, so those versions aborted with a fatal parse error before running any code. The bridge is rewritten in syntax valid from PHP 7.2 through 8.5, with identical behaviour on current PHP.

Building a PHP 7.2 image failed because its Alpine 3.12 base predates the icu-data-full package, gd's post-7.4 configure flags, current phpredis and xdebug, the bat package, and a transitive libgomp that ImageMagick needs. icu-data-full now installs tolerantly, gd's configure branches on PHP_VERSION_ID, xdebug and phpredis are pinned to the last releases supporting the older PHP line, bat installs tolerantly, and libgomp is added explicitly.

This adds on #405, which cherry-picked only the fixes; this branch-merge brings the changelog entry too.

geodro added 3 commits May 22, 2026 18:53
…age build

The MySQL readiness probe ran mysqladmin ping with no host, so it fell back to the Unix socket at /var/run/mysqld/mysqld.sock; images that keep the socket elsewhere failed the probe for the full 30 second timeout and printed a could not start mysql warning before every PHP command even though the server was healthy. The probe now forces IPv4 loopback TCP, which is independent of the image's socket path and stays correct inside the container on macOS and IPv6-only host networks. The mysql service-migration probe, dump, and restore commands force TCP the same way.

The dump() and dd() bridge that lerd installs as an auto_prepend_file used match, mixed and never type declarations, str_contains, str_ends_with, and array_key_first, none of which parse on PHP 7.4 and several not on 8.0, so those versions aborted with a fatal parse error before running any code and broke every CLI command and web request. The bridge is rewritten in syntax valid on every PHP version lerd builds, from 7.2 through 8.5, with identical behaviour on current PHP.

Building a PHP 7.2 image failed because its Alpine 3.12 base predates the icu-data-full package, gd's post-7.4 configure flags, current phpredis and xdebug, the bat package, and a transitive libgomp that ImageMagick needs. icu-data-full now installs tolerantly, gd's configure branches on PHP_VERSION_ID, xdebug and phpredis are pinned to the last releases supporting the older PHP line, bat installs tolerantly, and libgomp is added explicitly.
# Conflicts:
#	docs/changelog.md
#	internal/podman/quadlets/lerd-php-fpm.Containerfile
#	internal/version/version.go
@geodro geodro closed this May 22, 2026
@geodro geodro reopened this May 22, 2026
@geodro geodro merged commit 225547f into main May 22, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant