From 18262f5f5983e9e83c304fb5986cd36ea3449e82 Mon Sep 17 00:00:00 2001 From: David de Boer Date: Thu, 18 Jan 2024 21:18:43 +0100 Subject: [PATCH] Support sqlsrv on PHP 8.3 (#518) --- layers/sqlsrv/Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/layers/sqlsrv/Dockerfile b/layers/sqlsrv/Dockerfile index 33bb8554..13fd7fc7 100644 --- a/layers/sqlsrv/Dockerfile +++ b/layers/sqlsrv/Dockerfile @@ -10,8 +10,12 @@ RUN yum -y install unixODBC-devel-2.3.1-14.amzn2.x86_64 RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo RUN ACCEPT_EULA=Y yum -y install msodbcsql17-17.10.1.1-1.x86_64 -RUN pecl install sqlsrv-5.11.1 && \ - pecl install pdo_sqlsrv-5.11.1 +RUN if [ "$PHP_VERSION" = "83" ]; \ + then SQLSRV_VERSION=5.12.0beta1 ; \ + else SQLSRV_VERSION=5.11.1 ; \ + fi ; \ + pecl install sqlsrv-${SQLSRV_VERSION} && \ + pecl install pdo_sqlsrv-${SQLSRV_VERSION} RUN cp `php-config --extension-dir`/sqlsrv.so /tmp/sqlsrv.so RUN cp `php-config --extension-dir`/pdo_sqlsrv.so /tmp/pdo_sqlsrv.so