From c117ad004b849d9fe7496da4f09bbed9254f273d Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 10 Mar 2024 14:58:19 +0800 Subject: [PATCH] add pdo_sqlsrv for macOS and Linux --- config/ext.json | 9 +++++++++ config/source.json | 10 ++++++++++ src/SPC/ConsoleApplication.php | 2 +- src/globals/test-extensions.php | 2 +- 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/config/ext.json b/config/ext.json index 3bddb23b1..f927f3cdf 100644 --- a/config/ext.json +++ b/config/ext.json @@ -317,6 +317,15 @@ "sqlite" ] }, + "pdo_sqlsrv": { + "type": "external", + "source": "pdo_sqlsrv", + "arg-type": "with", + "ext-depends": [ + "pdo", + "sqlsrv" + ] + }, "pgsql": { "type": "builtin", "arg-type": "with-prefix", diff --git a/config/source.json b/config/source.json index e9f9dc8a7..406bb3687 100644 --- a/config/source.json +++ b/config/source.json @@ -495,6 +495,16 @@ "path": "LICENSE.txt" } }, + "pdo_sqlsrv": { + "type": "url", + "url": "https://pecl.php.net/get/pdo_sqlsrv", + "path": "php-src/ext/pdo_sqlsrv", + "filename": "pdo_sqlsrv.tgz", + "license": { + "type": "file", + "path": "LICENSE" + } + }, "pkg-config": { "type": "url", "url": "https://dl.static-php.dev/static-php-cli/deps/pkg-config/pkg-config-0.29.2.tar.gz", diff --git a/src/SPC/ConsoleApplication.php b/src/SPC/ConsoleApplication.php index a0f65f26d..9922d8a8c 100644 --- a/src/SPC/ConsoleApplication.php +++ b/src/SPC/ConsoleApplication.php @@ -25,7 +25,7 @@ */ final class ConsoleApplication extends Application { - public const VERSION = '2.1.4'; + public const VERSION = '2.1.5'; public function __construct() { diff --git a/src/globals/test-extensions.php b/src/globals/test-extensions.php index 46a205e03..2854885ca 100644 --- a/src/globals/test-extensions.php +++ b/src/globals/test-extensions.php @@ -13,7 +13,7 @@ // If you want to test your added extensions and libs, add below (comma separated, example `bcmath,openssl`). $extensions = match (PHP_OS_FAMILY) { - 'Linux', 'Darwin' => 'zlib,openssl,curl,pcntl,posix,mbstring,tokenizer,phar', + 'Linux', 'Darwin' => 'zlib,openssl,curl,pcntl,posix,mbstring,tokenizer,phar,pdo_sqlsrv', 'Windows' => 'mbstring,pdo_sqlite,mbregex,ffi', };