wp-update-server-plugin/vendor/yahnis-elsts
David Stone b737bb7e5f
fix: feature-detect GLOB_BRACE for musl-libc PHP builds (#31)
The vendored yahnis-elsts/wp-update-server library calls glob() with
GLOB_BRACE | GLOB_NOESCAPE. GLOB_BRACE is not defined on PHP builds
linked against musl libc (Alpine, the official static FrankenPHP
releases). In PHP 8 this triggers a fatal 'Uncaught Error: Undefined
constant GLOB_BRACE' in Wpup_UpdateServer::findFirstAsset() every time
the update API tries to resolve a plugin banner or icon asset.

Add a Composer patch (via cweagans/composer-patches) that switches to
runtime feature detection: when GLOB_BRACE is available, behaviour is
identical; when it is missing, fall back to one glob() call per
extension and merge the results. The patched UpdateServer.php is also
committed so existing deployments (which ship vendor/ as-is) pick up
the fix without re-running composer install.

An equivalent upstream PR is being submitted to YahnisElsts/wp-update-server.
2026-05-13 02:32:02 -06:00
..
wp-update-server fix: feature-detect GLOB_BRACE for musl-libc PHP builds (#31) 2026-05-13 02:32:02 -06:00