Skip to content

Commit 18262f5

Browse files
authored
Support sqlsrv on PHP 8.3 (#518)
1 parent faf7b12 commit 18262f5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

layers/sqlsrv/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ RUN yum -y install unixODBC-devel-2.3.1-14.amzn2.x86_64
1010
RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo
1111
RUN ACCEPT_EULA=Y yum -y install msodbcsql17-17.10.1.1-1.x86_64
1212

13-
RUN pecl install sqlsrv-5.11.1 && \
14-
pecl install pdo_sqlsrv-5.11.1
13+
RUN if [ "$PHP_VERSION" = "83" ]; \
14+
then SQLSRV_VERSION=5.12.0beta1 ; \
15+
else SQLSRV_VERSION=5.11.1 ; \
16+
fi ; \
17+
pecl install sqlsrv-${SQLSRV_VERSION} && \
18+
pecl install pdo_sqlsrv-${SQLSRV_VERSION}
1519

1620
RUN cp `php-config --extension-dir`/sqlsrv.so /tmp/sqlsrv.so
1721
RUN cp `php-config --extension-dir`/pdo_sqlsrv.so /tmp/pdo_sqlsrv.so

0 commit comments

Comments
 (0)