Skip to content

Remove references to ODBCVER and assume ODBC 3.x #19453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Aug 12, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, PHP 8.5.0beta2

- ODBC:
. Remove ODBCVER and assume ODBC 3.5. (Calvin Buckley)

- OpenSSL:
. Implement #81724 (openssl_cms_encrypt only allows specific ciphers).
(Jakub Zelenka)
Expand Down
4 changes: 4 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ PHP 8.5 UPGRADE NOTES
. Calling the mysqli constructor on an already-constructed object
is now no longer possible and throws an Error.

- ODBC:
. ODBC now assumes that at least ODBC 3.5 functionality is available. The
ODBCVER definition and build system flags to control it have been removed.

- Opcache:
. The Opcache extension is now always built into the PHP binary and is always
loaded. The INI directives opcache.enable and opcache.enable_cli are still
Expand Down
13 changes: 0 additions & 13 deletions ext/odbc/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,6 @@ dnl
dnl configure options
dnl

PHP_ARG_WITH([odbcver],,
[AS_HELP_STRING([[--with-odbcver[=HEX]]],
[Force support for the passed ODBC version. A hex number is expected,
default 0x0350. Use the special value of 0 to prevent an explicit ODBCVER to
be defined.])],
[0x0350])

AS_VAR_IF([ODBC_TYPE],, [
PHP_ARG_WITH([adabas],
[for Adabas support],
Expand Down Expand Up @@ -410,12 +403,6 @@ PHP_ARG_WITH([dbmaker],
])
])

AH_TEMPLATE([ODBCVER], [The highest supported ODBC version.])
AS_VAR_IF([PHP_ODBCVER], [no],
[AC_DEFINE([ODBCVER], [0x0350])],
[AS_VAR_IF([PHP_ODBCVER], [0],,
[AC_DEFINE_UNQUOTED([ODBCVER], [$PHP_ODBCVER])])])

dnl Extension setup
if test -n "$ODBC_TYPE"; then
AS_VAR_IF([ODBC_TYPE], [dbmaker],, [
Expand Down
6 changes: 0 additions & 6 deletions ext/odbc/config.w32
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// vim:ft=javascript

ARG_ENABLE("odbc", "ODBC support", "no");
ARG_WITH("odbcver", "Force support for the passed ODBC version. A hex number is expected, default 0x0350. Use the special value of 0 to prevent an explicit ODBCVER to be defined.", "0x0350");

if (PHP_ODBC == "yes") {
if (CHECK_LIB("odbc32.lib", "odbc") && CHECK_LIB("odbccp32.lib", "odbc")
Expand All @@ -10,11 +9,6 @@ if (PHP_ODBC == "yes") {
EXTENSION("odbc", "php_odbc.c odbc_utils.c", PHP_ODBC_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
AC_DEFINE("HAVE_UODBC", 1, "Define to 1 if the PHP extension 'odbc' is available.");
AC_DEFINE("HAVE_SQLDATASOURCES", 1, "Define to 1 if ODBC library has 'SQLDataSources', as a function or macro.");
if ("no" == PHP_ODBCVER) {
AC_DEFINE("ODBCVER", "0x0350", "The highest supported ODBC version.", false);
} else if ("0" != PHP_ODBCVER) {
AC_DEFINE("ODBCVER", PHP_ODBCVER, "The highest supported ODBC version.", false);
}
} else {
WARNING("odbc support can't be enabled, libraries or header are missing (SDK)")
PHP_ODBC = "no"
Expand Down
4 changes: 0 additions & 4 deletions ext/odbc/odbc.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,6 @@ class Result
* @cvalue SQL_TIMESTAMP
*/
const SQL_TIMESTAMP = UNKNOWN;

#if (defined(ODBCVER) && (ODBCVER >= 0x0300))
/**
* @var int
* @cvalue SQL_TYPE_DATE
Expand Down Expand Up @@ -327,8 +325,6 @@ class Result
*/
const SQL_QUICK = UNKNOWN;

#endif

function odbc_close_all(): void {}

function odbc_binmode(Odbc\Result $statement, int $mode): true {}
Expand Down
4 changes: 1 addition & 3 deletions ext/odbc/odbc_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading