Repository navigation
Conversation
|
I don't know much about Are those properties usable ? I mean does it make sense to expose this ? From what I see the extension always use the classes If making those resources visible make sense, it's currently possible to |
|
Good questions. Need to refresh my memory and investigate. |
Makes sense to me. |
Fix phpGH-8756 : oci_new_descriptor() triggers dynamic property deprecation. This fix should be temporary. At some point we should either define those properties or just hide them since they should probably not be used. Better fix is here : php#8758 but waiting feedback from Oracle team before going ahead.
|
6b6e5f3 should be reverted in this PR |
Next step will be to refactor the code to change those error messages and also maybe to remove the useless temp variables.
| } | ||
|
|
||
| if ((tmp = zend_hash_str_find(Z_OBJPROP_P(z_descriptor), "descriptor", sizeof("descriptor")-1)) == NULL) { | ||
| tmp = Z_OCILOB_DESCRIPTOR_P(z_descriptor); |
There was a problem hiding this comment.
Based on php_soap_deref added in https://github.com/php/php-src/commit/50484b59cd4ff5a1d32ce520fc7a7181b25ed0d9, I'd guess that these properties could benefit from dereferencing (pls double check it)
| typedef ub4 oci_phpsized_int; | ||
| #endif | ||
|
|
||
| #define Z_OCILOB_DESCRIPTOR_P(zv) OBJ_PROP_NUM(Z_OBJ_P(zv), 0) |
There was a problem hiding this comment.
IMO these macros should be added to the php_oci8_int.h header instead if they has to be shared internally.
| #[\AllowDynamicProperties] | ||
| class OCILob { | ||
| /** @var resource */ | ||
| public mixed $descriptor = null; |
There was a problem hiding this comment.
as far as I managed to understand, the property is private indeed as you guessed... Would be nice to double check with someone else and change the visibility accordingly. If someone later complains, we can still make it public again.
There was a problem hiding this comment.
Yep that's why I asked @cjbj for a confirmation. I'm not an OCI user and looking at some tests I see stuff like unset($clob->descriptor);.
There was a problem hiding this comment.
I won't have time to look at this until next month :(
Fix GH-8756