Skip to content
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

Migrate ext/odbc resources to opaque objects #12040

Merged
merged 11 commits into from
Apr 28, 2024
6 changes: 6 additions & 0 deletions UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ PHP 8.4 UPGRADE NOTES
- ODBC:
. odbc_fetch_row() returns false when a value less than or equal to 0 is
passed for parameter $row. Now, a warning is emitted in this case.
. odbc_connect() and odbc_pconnect() will now return an Odbc\Connection
object rather than a resource. Return value checks using is_resource()
should be replaced with checks for `false`.
. odbc_prepare(), odbc_exec(), and various other functions will now return
an Odbc\Result object rather than a resource. Return value checks using
is_resource() should be replaced with checks for `false`.

- Opcache:
. The JIT config defaults changed from opcache.jit=tracing and
Expand Down
25 changes: 0 additions & 25 deletions Zend/Optimizer/zend_func_infos.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,31 +308,6 @@ static const func_info_t func_infos[] = {
F1("mysqli_stat", MAY_BE_STRING|MAY_BE_FALSE),
F1("mysqli_store_result", MAY_BE_OBJECT|MAY_BE_FALSE),
F1("mysqli_use_result", MAY_BE_OBJECT|MAY_BE_FALSE),
FN("odbc_prepare", MAY_BE_RESOURCE|MAY_BE_FALSE),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I know, these always return a new instance, thus they can be annotated as @refcount 1, cannot they?

FN("odbc_exec", MAY_BE_RESOURCE|MAY_BE_FALSE),
FN("odbc_connect", MAY_BE_RESOURCE|MAY_BE_FALSE),
FN("odbc_pconnect", MAY_BE_RESOURCE|MAY_BE_FALSE),
FN("odbc_tables", MAY_BE_RESOURCE|MAY_BE_FALSE),
FN("odbc_columns", MAY_BE_RESOURCE|MAY_BE_FALSE),
FN("odbc_gettypeinfo", MAY_BE_RESOURCE|MAY_BE_FALSE),
FN("odbc_primarykeys", MAY_BE_RESOURCE|MAY_BE_FALSE),
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
FN("odbc_procedurecolumns", MAY_BE_RESOURCE|MAY_BE_FALSE),
#endif
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
FN("odbc_procedures", MAY_BE_RESOURCE|MAY_BE_FALSE),
#endif
#if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) && !defined(HAVE_SOLID_35)
FN("odbc_foreignkeys", MAY_BE_RESOURCE|MAY_BE_FALSE),
#endif
FN("odbc_specialcolumns", MAY_BE_RESOURCE|MAY_BE_FALSE),
FN("odbc_statistics", MAY_BE_RESOURCE|MAY_BE_FALSE),
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35)
FN("odbc_tableprivileges", MAY_BE_RESOURCE|MAY_BE_FALSE),
#endif
#if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) &&!defined(HAVE_SOLID_35)
FN("odbc_columnprivileges", MAY_BE_RESOURCE|MAY_BE_FALSE),
#endif
F1("opcache_get_status", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_FALSE),
F1("opcache_get_configuration", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_ANY|MAY_BE_FALSE),
F1("openssl_x509_parse", MAY_BE_ARRAY|MAY_BE_ARRAY_KEY_STRING|MAY_BE_ARRAY_OF_LONG|MAY_BE_ARRAY_OF_STRING|MAY_BE_ARRAY_OF_ARRAY|MAY_BE_FALSE),
Expand Down
Loading
Loading