Is your feature request related to a problem? Please describe.
pdo_sqlsrv was dropped from the static binary's default extension set as a side effect of the PHP 8.5 upgrade, and I think the reason for dropping it no longer applies.
Timeline:
I assume it was dropped because msphpsql didn't support PHP 8.5 at that moment — which was true on 2026-02-20. But msphpsql v5.13.0 shipped seven days later (2026-02-27) with "Support for PHP 8.4 and PHP 8.5", plus Alpine 3.20–3.23, which covers the musl target the fully-static build uses. v5.13.1 followed on 2026-04-30. pdo_sqlsrv is also still listed as supported by static-php-cli.
Effect on the released binary (FrankenPHP v1.12.3, PHP 8.5.6, fully-static Linux x86_64):
$ frankenphp php-cli -r 'print_r(PDO::getAvailableDrivers());'
Array
(
[0] => mysql
[1] => pgsql
[2] => sqlite
)
Because fully-static musl binaries can't load extensions dynamically, there's no way to add it back at runtime — an app that talks to SQL Server has to either drop the static binary or shell out to a system PHP CLI for every query.
Describe the solution you'd like
Re-add pdo_sqlsrv to defaultExtensions in build-static.sh, now that msphpsql supports PHP 8.5 on the relevant targets.
If it's being deliberately kept out — binary size, the unixODBC/msodbcsql dependency, or musl build trouble — that's completely fair, and a note in docs/static.md saying so would save the next person the git archaeology. Happy to open a PR for either the extension or the doc note.
Describe alternatives you've considered
- Building a custom static binary with
PHP_EXTENSIONS=...,pdo_sqlsrv — works, but means maintaining our own build and release pipeline just to regain one extension that was previously in the default set.
- Switching to the glibc-based mostly-static build, which can load extensions dynamically. The extension has to be compiled with ZTS support, and package managers don't ship ZTS builds, so this means compiling msphpsql by hand inside
static-builder-gnu and keeping it in step with each upgrade.
- Shelling out to a system PHP CLI that has
pdo_sqlsrv installed. This is what we do today. It works, but it means the web runtime and the CLI runtime have different database capabilities, which is an awkward thing to design around.
Is your feature request related to a problem? Please describe.
pdo_sqlsrvwas dropped from the static binary's default extension set as a side effect of the PHP 8.5 upgrade, and I think the reason for dropping it no longer applies.Timeline:
pdo_sqlsrvin the default set, and feat: add pdo_sqlsrv extension to static binary #1750 added it (merged 2025-07-17,ce9620b).f388348) removedpdo_sqlsrvfromdefaultExtensionsinbuild-static.sh. The diff only changes that one line among the version bump, and the PR body is empty, so the removal isn't mentioned in the title, body, or docs.I assume it was dropped because msphpsql didn't support PHP 8.5 at that moment — which was true on 2026-02-20. But msphpsql v5.13.0 shipped seven days later (2026-02-27) with "Support for PHP 8.4 and PHP 8.5", plus Alpine 3.20–3.23, which covers the musl target the fully-static build uses. v5.13.1 followed on 2026-04-30.
pdo_sqlsrvis also still listed as supported by static-php-cli.Effect on the released binary (FrankenPHP v1.12.3, PHP 8.5.6, fully-static Linux x86_64):
Because fully-static musl binaries can't load extensions dynamically, there's no way to add it back at runtime — an app that talks to SQL Server has to either drop the static binary or shell out to a system PHP CLI for every query.
Describe the solution you'd like
Re-add
pdo_sqlsrvtodefaultExtensionsinbuild-static.sh, now that msphpsql supports PHP 8.5 on the relevant targets.If it's being deliberately kept out — binary size, the unixODBC/msodbcsql dependency, or musl build trouble — that's completely fair, and a note in
docs/static.mdsaying so would save the next person the git archaeology. Happy to open a PR for either the extension or the doc note.Describe alternatives you've considered
PHP_EXTENSIONS=...,pdo_sqlsrv— works, but means maintaining our own build and release pipeline just to regain one extension that was previously in the default set.static-builder-gnuand keeping it in step with each upgrade.pdo_sqlsrvinstalled. This is what we do today. It works, but it means the web runtime and the CLI runtime have different database capabilities, which is an awkward thing to design around.