[php-src] PR #17556: Avoid calling deprecated ODBC functions

From: Date: Fri, 24 Jan 2025 12:23:00 +0000
Subject: [php-src] PR #17556: Avoid calling deprecated ODBC functions
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-30487@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/17556 Author: cmb69 SQLGetConnectOption, SQLSetConnectOption and SQLSetStmtOption are deprecated, so if ODBC 3 is available, we use SQLSetConnectAttr, SQLGetConnectAttr, and SQLSetStmtAttr instead. --- I'm not quite sure how to actually handle this best. Assuming that we won't require ODBC >= 3, some of the error messages would need to be adapted (e.g. we should not report an issue with SQLConnectOption, when we actually called SQLSetConnectAttr. Furthermore, the generic replacement in odbc_setoption() might be too presumptious (from looking at sqlext.h, it seems to be okay, but who knows). Possibly, we should deprecate this PHP function altogether (at least the docs could need some update). > However, if on a particular job it can make PHP work so your boss doesn't tell you to use > a commercial product, that's all that really matters. ¯\\_(ツ)_/¯ A possible alternative to the PR as is would be to introduce general shims as macros, but this might cause even more confusion. Anyhow, we should have a look at the double casts (SQLPOINTER) (intptr_t) (without, Clang 18.1.8 complains); we should probably use integer types which have the same size as a pointer in the first place.

« previous php.git-pulls (#30487) next »