Skip to content

Commit 00faac1

Browse files
authored
Merge pull request #1493 from microsoft/dev
Prepare for 5.12.0-beta1 release
2 parents f6f76d4 + 41ac126 commit 00faac1

File tree

74 files changed

+577
-465
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+577
-465
lines changed

CHANGELOG.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,65 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55

6+
## 5.12.0-beta1 - 2023-12-08
7+
Updated PECL release packages. Here is the list of updates:
8+
9+
### Added
10+
- Support for PHP 8.3
11+
12+
### Removed
13+
- Support for PHP 8.0
14+
- Support for Ubuntu 18.04
15+
16+
### Fixed
17+
- Update connection string keywords set function (#1484)
18+
- Fix error throw for multiple result sets (#1485)
19+
20+
### Limitations
21+
- No support for inout / output params when using sql_variant type
22+
- No support for inout / output params when formatting decimal values
23+
- In Linux and macOS, setlocale() only takes effect if it is invoked before the first connection. Attempting to set the locale after connecting will not work
24+
- Always Encrypted requires [MS ODBC Driver 17+](https://docs.microsoft.com/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server)
25+
- Only Windows Certificate Store and Azure Key Vault are supported. Custom Keystores are not yet supported
26+
- Issue [#716](https://github.com/Microsoft/msphpsql/issues/716) - With Always Encrypted enabled, named parameters in subqueries are not supported
27+
- Issue [#1050](https://github.com/microsoft/msphpsql/issues/1050) - With Always Encrypted enabled, insertion requires the column list for any tables with identity columns
28+
- [Always Encrypted limitations](https://docs.microsoft.com/sql/connect/php/using-always-encrypted-php-drivers#limitations-of-the-php-drivers-when-using-always-encrypted)
29+
30+
### Known Issues
31+
- This release requires ODBC Driver 17.4.2 or above. Otherwise, a warning about failing to set an attribute may be suppressed when using an older ODBC driver.
32+
- Connection pooling on Linux or macOS is not recommended with [unixODBC](http://www.unixodbc.org/) < 2.3.7
33+
- When pooling is enabled in Linux or macOS
34+
- unixODBC <= 2.3.4 (Linux and macOS) might not return proper diagnostic information, such as error messages, warnings and informative messages
35+
- due to this unixODBC bug, fetch large data (such as xml, binary) as streams as a workaround. See the examples [here](https://github.com/Microsoft/msphpsql/wiki/Features#pooling)
36+
37+
38+
## 5.11.1 - 2023-08-31
39+
Updated PECL release packages. Here is the list of updates:
40+
41+
### Fixed
42+
- Reset type after bind param (#1452)
43+
- Fixed error when using PDO::ATTR_STRINGIFY_FETCHES (#1468) by SakiTakamachi
44+
- Change connection options to case insensitive (#1460)
45+
- Bugfix for 1465 Adding a NULL check (#1471)
46+
47+
### Limitations
48+
- No support for inout / output params when using sql_variant type
49+
- No support for inout / output params when formatting decimal values
50+
- In Linux and macOS, setlocale() only takes effect if it is invoked before the first connection. Attempting to set the locale after connecting will not work
51+
- Always Encrypted requires [MS ODBC Driver 17+](https://docs.microsoft.com/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server)
52+
- Only Windows Certificate Store and Azure Key Vault are supported. Custom Keystores are not yet supported
53+
- Issue [#716](https://github.com/Microsoft/msphpsql/issues/716) - With Always Encrypted enabled, named parameters in subqueries are not supported
54+
- Issue [#1050](https://github.com/microsoft/msphpsql/issues/1050) - With Always Encrypted enabled, insertion requires the column list for any tables with identity columns
55+
- [Always Encrypted limitations](https://docs.microsoft.com/sql/connect/php/using-always-encrypted-php-drivers#limitations-of-the-php-drivers-when-using-always-encrypted)
56+
57+
### Known Issues
58+
- This release requires ODBC Driver 17.4.2 or above. Otherwise, a warning about failing to set an attribute may be suppressed when using an older ODBC driver.
59+
- Connection pooling on Linux or macOS is not recommended with [unixODBC](http://www.unixodbc.org/) < 2.3.7
60+
- When pooling is enabled in Linux or macOS
61+
- unixODBC <= 2.3.4 (Linux and macOS) might not return proper diagnostic information, such as error messages, warnings and informative messages
62+
- due to this unixODBC bug, fetch large data (such as xml, binary) as streams as a workaround. See the examples [here](https://github.com/Microsoft/msphpsql/wiki/Features#pooling)
63+
64+
665
## 5.11.0 - 2023-02-28
766
Updated PECL release packages. Here is the list of updates:
867

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright(c) 2022 Microsoft Corporation
1+
Copyright(c) 2023 Microsoft Corporation
22
All rights reserved.
33

44
MIT License

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ Thank you for taking the time to participate in the [sentiment survey](https://g
1919

2020
[av-image]: https://ci.appveyor.com/api/projects/status/vo4rfei6lxlamrnc?svg=true
2121
[av-site]: https://ci.appveyor.com/project/msphpsql/msphpsql/branch/dev
22-
[az-site]: https://dev.azure.com/sqlclientdrivers-ci/msphpsql/_build/latest?definitionId=6&branchName=dev
23-
[az-image]: https://dev.azure.com/sqlclientdrivers-ci/msphpsql/_apis/build/status/Microsoft.msphpsql?branchName=dev
22+
[az-site]: https://sqlclientdrivers.visualstudio.com/public/_build/latest?definitionId=1230&branchName=refs%2Fpull%2F1492%2Fmerge
23+
[az-image]: https://sqlclientdrivers.visualstudio.com/public/_apis/build/status%2FPHP%2Fmicrosoft.msphpsql?branchName=refs%2Fpull%2F1492%2Fmerge
2424
[Coverage Codecov]: https://codecov.io/gh/microsoft/msphpsql/branch/dev/graph/badge.svg
2525
[codecov-site]: https://codecov.io/gh/microsoft/msphpsql
2626

@@ -37,7 +37,7 @@ Please follow the [Getting started](https://docs.microsoft.com/sql/connect/php/g
3737
For full details on the system requirements for the drivers, see the [system requirements](https://docs.microsoft.com/sql/connect/php/system-requirements-for-the-php-sql-driver) on Microsoft Docs.
3838

3939
On the client machine:
40-
- 8.0.x, 8.1.x, 8.2.x
40+
- 8.1.x, 8.2.x, 8.3.x
4141
- [Microsoft ODBC Driver 18, 17 or 13][odbcdoc]
4242
- If using a Web server such as Internet Information Services (IIS) or Apache, it must be configured to run PHP
4343

appveyor.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,6 @@ environment:
1515
APPVEYOR: true
1616
# For details about Appveyor build worker images (VM template): https://www.appveyor.com/docs/build-environment/#build-worker-images
1717
matrix:
18-
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
19-
BUILD_PLATFORM: x64
20-
TEST_PHP_SQL_SERVER: (local)\SQL2017
21-
SQL_INSTANCE: SQL2017
22-
PHP_VC: vc15
23-
PHP_MAJOR_VER: 7.4
24-
PHP_MINOR_VER: latest
25-
PHP_EXE_PATH: x64\Release_TS
26-
THREAD: ts
27-
platform: x64
2818
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
2919
BUILD_PLATFORM: x86
3020
TEST_PHP_SQL_SERVER: (local)\SQL2019
@@ -35,7 +25,16 @@ environment:
3525
PHP_EXE_PATH: Release
3626
THREAD: nts
3727
platform: x86
38-
28+
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
29+
BUILD_PLATFORM: x86
30+
TEST_PHP_SQL_SERVER: (local)\SQL2019
31+
SQL_INSTANCE: SQL2019
32+
PHP_VC: vs16
33+
PHP_MAJOR_VER: 8.1
34+
PHP_MINOR_VER: latest
35+
PHP_EXE_PATH: Release
36+
THREAD: nts
37+
platform: x86
3938
# PHP_MAJOR_VER is PHP major version to build (7.4, 7.3)
4039
# PHP_MINOR_VER is PHP point release number (or latest for latest release)
4140
# PHP_VC is the Visual C++ version

azure-pipelines.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
6363
- job: Linux
6464
variables:
65-
phpver: 8.0
65+
phpver: 8.1
6666
pool:
6767
vmImage: 'ubuntu-20.04'
6868
steps:
@@ -185,7 +185,7 @@ jobs:
185185
sed -i -e 's/TARGET_PASSWORD/'"$(pwd)"'/g' MsSetup.inc
186186
187187
export LC_ALL='en_US.UTF-8'
188-
php run-tests.php -P ./*.phpt --no-color 2>&1 | tee ../sqlsrv.log
188+
php run-tests.php -P ./*.phpt --no-color --show-diff 2>&1 | tee ../sqlsrv.log
189189
displayName: 'Run sqlsrv functional tests'
190190
191191
- script: |
@@ -196,7 +196,7 @@ jobs:
196196
sed -i -e 's/TARGET_PASSWORD/'"$(pwd)"'/g' MsSetup.inc
197197
198198
export LC_ALL='en_US.UTF-8'
199-
php run-tests.php -P ./*.phpt --no-color 2>&1 | tee ../pdo_sqlsrv.log
199+
php run-tests.php -P ./*.phpt --no-color --show-diff 2>&1 | tee ../pdo_sqlsrv.log
200200
displayName: 'Run pdo_sqlsrv functional tests'
201201
202202
- script: |
@@ -213,6 +213,7 @@ jobs:
213213
PYTHONWARNINGS: ignore::yaml.YAMLLoadWarning
214214
215215
- script: |
216+
docker logs -t $(host)
216217
cd $(Build.SourcesDirectory)/test/functional/
217218
for f in sqlsrv/*.diff; do ls $f 2>/dev/null; cat $f 2>/dev/null; echo ''; done || true
218219
for f in pdo_sqlsrv/*.diff; do ls $f 2>/dev/null; cat $f 2>/dev/null; echo ''; done || true

buildscripts/buildtools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ def build_drivers(self, make_clean = False, dest = None, log_file = None):
393393

394394
batch_file = self.create_local_batch_file(make_clean, cmd_line, log_file)
395395

396-
# Reference: https://github.com/OSTC/php-sdk-binary-tools
396+
# Reference: https://github.com/php/php-sdk-binary-tools
397397
# Clone the master branch of PHP sdk if the directory does not exist
398398
print('Downloading the latest php SDK...')
399399

@@ -406,7 +406,7 @@ def build_drivers(self, make_clean = False, dest = None, log_file = None):
406406

407407
phpSDK = os.path.join(sdk_dir, 'php-sdk')
408408
if not os.path.exists( phpSDK ):
409-
os.system('git clone https://github.com/OSTC/php-sdk-binary-tools.git --branch master --single-branch --depth 1 ' + phpSDK)
409+
os.system('git clone https://github.com/php/php-sdk-binary-tools.git --branch master --single-branch --depth 1 ' + phpSDK)
410410
os.chdir(phpSDK)
411411
os.system('git pull ')
412412
print('Done cloning the latest php SDK...')

source/pdo_sqlsrv/config.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dnl
44
dnl Contents: the code that will go into the configure script, indicating options,
55
dnl external libraries and includes, and what source files are to be compiled.
66
dnl
7-
dnl Microsoft Drivers 5.11 for PHP for SQL Server
7+
dnl Microsoft Drivers 5.12 for PHP for SQL Server
88
dnl Copyright(c) Microsoft Corporation
99
dnl All rights reserved.
1010
dnl MIT License

source/pdo_sqlsrv/config.w32

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44
// Contents: JScript build configuration used by buildconf.bat
55
//
6-
// Microsoft Drivers 5.11 for PHP for SQL Server
6+
// Microsoft Drivers 5.12 for PHP for SQL Server
77
// Copyright(c) Microsoft Corporation
88
// All rights reserved.
99
// MIT License
@@ -34,6 +34,8 @@ if( PHP_PDO_SQLSRV != "no" ) {
3434
ADD_FLAG( "CFLAGS_PDO_SQLSRV", "/EHsc" );
3535
ADD_FLAG( "CFLAGS_PDO_SQLSRV", "/GS" );
3636
ADD_FLAG( "CFLAGS_PDO_SQLSRV", "/Zi" );
37+
ADD_FLAG( "CFLAGS_PDO_SQLSRV", "/ZH:SHA_256 /sdl /W3" );
38+
ADD_FLAG( "LDFLAGS_PDO_SQLSRV", "/CETCOMPAT" );
3739
if (PHP_DEBUG != "yes") ADD_FLAG( "CFLAGS_PDO_SQLSRV", "/guard:cf /O2" );
3840
ADD_FLAG( "CFLAGS_PDO_SQLSRV", "/D ZEND_WIN32_FORCE_INLINE" );
3941
if (VCVERS >= 1913) {

source/pdo_sqlsrv/pdo_dbh.cpp

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44
// Contents: Implements the PDO object for PDO_SQLSRV
55
//
6-
// Microsoft Drivers 5.11 for PHP for SQL Server
6+
// Microsoft Drivers 5.12 for PHP for SQL Server
77
// Copyright(c) Microsoft Corporation
88
// All rights reserved.
99
// MIT License
@@ -151,16 +151,13 @@ struct pdo_encrypt_set_func
151151
if (found != std::string::npos)
152152
val_str.erase(found + 1);
153153

154-
const char TRUE_VALUE_1[] = "true";
155-
const char TRUE_VALUE_2[] = "1";
156-
const char FALSE_VALUE_1[] = "false";
157-
const char FALSE_VALUE_2[] = "0";
154+
transform(val_str.begin(), val_str.end(), val_str.begin(), ::tolower);
158155

159-
// For backward compatibility, convert true/1 to yes and false/0 to no
156+
// For backward compatibility, convert true/1 to yes
160157
std::string attr;
161-
if (!val_str.compare(TRUE_VALUE_1) || !val_str.compare(TRUE_VALUE_2)) {
158+
if (!val_str.compare("true") || !val_str.compare("1") || !val_str.compare("yes")) {
162159
attr = "yes";
163-
} else if (!val_str.compare(FALSE_VALUE_1) || !val_str.compare(FALSE_VALUE_2)) {
160+
} else if (!val_str.compare("false") || !val_str.compare("0") || !val_str.compare("no")) {
164161
attr = "no";
165162
} else {
166163
// simply pass the attribute value to ODBC driver
@@ -978,7 +975,7 @@ zend_long pdo_sqlsrv_dbh_do(_Inout_ pdo_dbh_t *dbh, _In_ const zend_string *sql)
978975
// since the user can give us a compound statement, we return the row count for the last set, and since the row count
979976
// isn't guaranteed to be valid until all the results have been fetched, we fetch them all first.
980977

981-
if ( execReturn != SQL_NO_DATA && core_sqlsrv_has_any_result( driver_stmt )) {
978+
if ( core_sqlsrv_has_any_result( driver_stmt )) {
982979

983980
SQLRETURN r = SQL_SUCCESS;
984981

@@ -990,7 +987,6 @@ zend_long pdo_sqlsrv_dbh_do(_Inout_ pdo_dbh_t *dbh, _In_ const zend_string *sql)
990987

991988
} while ( r != SQL_NO_DATA );
992989
}
993-
994990
// returning -1 forces PDO to return false, which signals an error occurred. SQLRowCount returns -1 for a number of cases
995991
// naturally, so we override that here with no rows returned.
996992
if( rows == -1 ) {
@@ -1323,6 +1319,12 @@ bool pdo_sqlsrv_dbh_set_attr(_Inout_ pdo_dbh_t *dbh, _In_ zend_long attr, _Inout
13231319
break;
13241320
#endif
13251321

1322+
case PDO_ATTR_STRINGIFY_FETCHES:
1323+
{
1324+
// do nothing
1325+
}
1326+
break;
1327+
13261328
// Not supported
13271329
case PDO_ATTR_FETCH_TABLE_NAMES:
13281330
case PDO_ATTR_FETCH_CATALOG_NAMES:

source/pdo_sqlsrv/pdo_init.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44
// Contents: initialization routines for PDO_SQLSRV
55
//
6-
// Microsoft Drivers 5.11 for PHP for SQL Server
6+
// Microsoft Drivers 5.12 for PHP for SQL Server
77
// Copyright(c) Microsoft Corporation
88
// All rights reserved.
99
// MIT License

0 commit comments

Comments
 (0)