Skip to content

Conversation

@terabytesoftw
Copy link
Member

@terabytesoftw terabytesoftw commented Jan 22, 2026

Pull Request

Q A
Is bugfix? ✔️
New feature?
Breaks BC?

Summary by CodeRabbit

  • Bug Fixes

    • Fixed SQL Server (sqlsrv/pdo_sqlsrv) extension support on PHP 8.5 in full image builds (BuildKit-mounted script approach).
  • Documentation

    • Added changelog entry under v1.1.0 documenting the build-related fix.

✏️ Tip: You can customize this high-level summary in your review settings.

@terabytesoftw terabytesoftw added the bug Something isn't working label Jan 22, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2026

📝 Walkthrough

Walkthrough

Refactors MS SQL Server PHP extension installation from inline Dockerfile commands into two BuildKit-mounted Bash scripts, enabling conditional source-based pdo_sqlsrv compilation for PHP 8.5+. Adds a changelog entry documenting the build fix for sqlsrv/pdo_sqlsrv on PHP 8.5.

Changes

Cohort / File(s) Summary
Changelog
CHANGELOG.md
Adds v1.1.0 under-development note documenting bug fix for sqlsrv/pdo_sqlsrv builds on PHP 8.5 using BuildKit-mounted scripts.
Dockerfile Refactor
src/flavor/apache/Dockerfile
Removes inline msodbcsql/sqlsrv install block and replaces it with a single RUN that executes an external build script via BuildKit --mount.
ODBC Repo & Runtime
src/script/build/01-mssql-odbc.sh
New script exposing mssql_add_apt_repo() and mssql_install_odbc_runtime() to configure Microsoft ODBC repo and install msodbcsql18/unixodbc.
PHP Extensions Build Script
src/script/build/10-mssql-php-ext.sh
New script with main() that sources the ODBC script, installs build deps, installs sqlsrv via PECL, and conditionally builds pdo_sqlsrv from source for PHP >= 8.5 or installs via PECL otherwise; enables extensions and cleans up.

Sequence Diagram

sequenceDiagram
    participant DockerBuild as Docker Build
    participant Dockerfile as Dockerfile
    participant ExtScript as 10-mssql-php-ext.sh
    participant RepoScript as 01-mssql-odbc.sh
    participant Apt as System Package Manager
    participant PECL as PECL

    DockerBuild->>Dockerfile: run full-stage build
    Dockerfile->>ExtScript: mount & execute script via RUN --mount
    ExtScript->>RepoScript: source helper script
    ExtScript->>RepoScript: call mssql_add_apt_repo()
    RepoScript->>Apt: add MS ODBC repo & import GPG
    ExtScript->>RepoScript: call mssql_install_odbc_runtime()
    RepoScript->>Apt: install msodbcsql18 & unixodbc
    ExtScript->>PECL: install sqlsrv via PECL
    alt PHP >= 8.5
        ExtScript->>Apt: download pdo_sqlsrv source, phpize, configure, make, install
    else PHP < 8.5
        ExtScript->>PECL: install pdo_sqlsrv via PECL
    end
    ExtScript->>Dockerfile: enable sqlsrv & pdo_sqlsrv in PHP
    Dockerfile->>DockerBuild: layer complete
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

🐰 I hopped into the build one night,

Mounts in paw, the scripts felt right,
PHP Eight-Five danced and grinned,
MSSQL extensions neatly pinned,
A rabbit's cheer for builds now bright!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: building sqlsrv/pdo_sqlsrv in the full image on PHP 8.5 using BuildKit-mounted scripts, which is confirmed by the Dockerfile refactoring and new build scripts.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@terabytesoftw terabytesoftw merged commit d3977a3 into main Jan 22, 2026
18 checks passed
@terabytesoftw terabytesoftw deleted the fix_mini_21 branch January 22, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants