-
Notifications
You must be signed in to change notification settings - Fork 7.8k
ext-oci8: oci_new_descriptor()
triggers dynamic property deprecation
#8756
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
Comments
Thank you very much for working on this. I don't use that extension much myself either. I help maintaining Doctrine DBAL and this issue bubbled up in our CI. 🙈 But as far as I can tell, DBAL never accesses those properties ( |
@derrabus Thanks. I'll wait for answers on the code review. Would it be possible for you to run your test suite on the branch with the current fix ? |
We need to test oci8 and pdo_oci in our CI; there is #8348, but that needs more work. I doubt that a setup on AppVeyor makes sense, since the latest Oracle XE download is almost 2GB, and it is not yet preinstalled. |
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.
The deprecation warnings are gone now. Thank you! |
Welcome. Thanks for reporting |
Hi! After installing php 8.2 I keep getting the following error: |
What exact version of PHP are you using ? Can you narrow it to a small reproducible script? |
PHP Version 8.2.4 |
I use php in a container, based on the basic php-fpm image |
I think, the important part was:
|
Same problem here. PHP Version 8.2.4 based on php:8.2.4-apache-bullseye |
@dormadekhin @BigOHenry I took some time to look at the issue but wasn't able to reproduce it. I tried first using the official 8.2.5 source code, then built a docker image based on php:8.2.4-apache-bullseye as you suggested and both of them worked.
Could you provide me a minimal script to reproduce the error, and how you built the image ? That would be helpful. Also what's the output when you run a script like this: <?php
foreach ([ OCILob::class, OCICollection::class ] as $cn) {
$rc = new ReflectionClass($cn);
foreach ($rc->getAttributes() as $attribute) {
var_dump($attribute->getName());
}
}
$x = new OCILob();
$x->foo = 'bar';
$y = new OCICollection();
$y->foo = 'bar'; @derrabus Do you also have the same issue ? |
No, from my POV, the issue has been resolved. |
I will try prepare the image this week (kind of busy right now).
EDIT: Just found new version of oci8 php extension for php8.2 (released 4 days ago). I will try it, it could be fixed (dont know if error is caused by php or oci8) |
I made some test with new oci8 (3.3.0) and with php8.2.5 and it seems the issue is solved. Thank you for your time! |
Description
The following code:
https://github.com/doctrine/dbal/blob/e15d05d08172ceeb4f55066feed48d688fdb0250/src/Driver/OCI8/Statement.php#L75
Resulted in this output:
https://github.com/doctrine/dbal/runs/6850136105?check_suite_focus=true
But I expected this output instead:
The piece of code that PHP complains about does not write any property directly but calls
oci_new_descriptor()
which is supposed to return a newOCILob
instance. I don't feel like I could avoid the deprecation.PHP Version
PHP 8.2-dev 13479ee
Operating System
Ubuntu 20.04
The text was updated successfully, but these errors were encountered: