Skip to content

fix: install sqlsrv and pdo_sqlsrv with separate pecl commands - #58

Merged
stasadev merged 1 commit into
mainfrom
fix/pecl-partial-install
Oct 22, 2026
Merged

stasadev merged 1 commit into
mainfrom
fix/pecl-partial-install

Conversation

@stasadev

@stasadev stasadev commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Short Summary (TL;DR)

pecl install a b exits 0 when only one of the packages fails, so the PHP 8.1 and 8.2 builds passed with pdo_sqlsrv missing. This installs each extension with a separate pecl install, so any failure stops the build.

The Issue

PHP 7.4 and 8.0 failed at ddev restart, as expected. PHP 8.1 and 8.2 built fine and only failed on assert_line "pdo_sqlsrv", because sqlsrv was installed and pdo_sqlsrv wasn't. PEAR only returns an error when none of the requested packages could be downloaded, see doInstall() in PEAR/Command/Install.php.

How This PR Solves The Issue

sqlsrv and pdo_sqlsrv are installed with two pecl install commands, so set -e catches a failure in either of them.

This doesn't work around php/web-pecl#119. PHP 7.0-8.2 tests will keep failing until it's fixed on the pecl.php.net side.

Manual Testing Instructions

ddev config --php-version=8.2
ddev add-on get ddev/ddev-sqlsrv --pr 58
ddev restart
ddev exec php -m | grep sqlsrv
# Expect sqlsrv and pdo_sqlsrv

Automated Testing Overview

No new tests. The existing php70-php73 and php74-php82 tests cover the PECL install.

Release/Deployment Notes

None.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@stasadev
stasadev merged commit fb95fa7 into main Oct 22, 2026
2 of 6 checks passed
@stasadev
stasadev deleted the fix/pecl-partial-install branch October 22, 2026 12:00
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