diff --git a/MAINTAINERS.md b/MAINTAINERS.md index d45f434..c91e6a2 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -85,17 +85,17 @@ The latest available version of the `opencensus` PHP extension is not compatible We manually patch the latest version to make it compatible with PHP 7.3 and PHP 7.4. We should switch to the stable release once it will be available. -### pdo_sqlsrv / sqlsrv - -The `pdo_sqlsrv` and `sqlsrv` PHP extensions require the Microsoft ODBC Driver for SQL Server. -On Alpine Linux there's no way to automatically install its latest version, so we install it manually. -We need to monitor new releases at https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server#alpine17 - ### snuffleupagus The `snuffleupagus` PHP extension is not available in the PECL archive, so we install it manually. We need to monitor new releases at https://github.com/jvoisin/snuffleupagus/releases +### sqlsrv / pdo_sqlsrv + +The `pdo_sqlsrv` and `sqlsrv` PHP extensions require the Microsoft ODBC Driver for SQL Server. +On Alpine Linux there's no way to automatically install its latest version, so we install it manually. +We need to monitor new releases at https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server#alpine17 + ### ssh2 The latest stable release of the `ssh2` PHP extension is very old, so we install the latest beta release. diff --git a/install-php-extensions b/install-php-extensions index 9b7f8dd..b8dfdca 100755 --- a/install-php-extensions +++ b/install-php-extensions @@ -1817,23 +1817,6 @@ installRemoteModule() { fi fi ;; - pdo_sqlsrv | sqlsrv) - if test -z "$installRemoteModule_version"; then - # https://docs.microsoft.com/it-it/sql/connect/php/system-requirements-for-the-php-sql-driver?view=sql-server-2017 - if test $PHP_MAJMIN_VERSION -le 506; then - installRemoteModule_version=3.0.1 - elif test $PHP_MAJMIN_VERSION -le 700; then - installRemoteModule_version=5.3.0 - elif test $PHP_MAJMIN_VERSION -le 701; then - installRemoteModule_version=5.6.1 - elif test $PHP_MAJMIN_VERSION -le 702; then - installRemoteModule_version=5.8.1 - fi - fi - if ! isMicrosoftSqlServerODBCInstalled; then - installMicrosoftSqlServerODBC - fi - ;; propro) if test -z "$installRemoteModule_version"; then if test $PHP_MAJMIN_VERSION -le 506; then @@ -1947,6 +1930,23 @@ installRemoteModule() { fi fi ;; + sqlsrv | pdo_sqlsrv) + if test -z "$installRemoteModule_version"; then + # https://docs.microsoft.com/it-it/sql/connect/php/system-requirements-for-the-php-sql-driver?view=sql-server-2017 + if test $PHP_MAJMIN_VERSION -le 506; then + installRemoteModule_version=3.0.1 + elif test $PHP_MAJMIN_VERSION -le 700; then + installRemoteModule_version=5.3.0 + elif test $PHP_MAJMIN_VERSION -le 701; then + installRemoteModule_version=5.6.1 + elif test $PHP_MAJMIN_VERSION -le 702; then + installRemoteModule_version=5.8.1 + fi + fi + if ! isMicrosoftSqlServerODBCInstalled; then + installMicrosoftSqlServerODBC + fi + ;; ssh2) if test -z "$installRemoteModule_version"; then if test $PHP_MAJMIN_VERSION -le 506; then