Giter Site home page Giter Site logo

Comments (13)

nikic avatar nikic commented on May 14, 2024 2

A sample of the required change for soap, which was using the exact same pattern: c5d6f59 (and still is, for three more resources...)

from php-src.

cjbj avatar cjbj commented on May 14, 2024 2

I just pushed OCI8 3.2 to PECL. Give it a whirl. It is for PHP 8.1 only.

from php-src.

cjbj avatar cjbj commented on May 14, 2024 1

Excellent. I'll take a look when I'm back.

from php-src.

cmb69 avatar cmb69 commented on May 14, 2024

That's caused by 14f599e, so PECL/oci8 needs to be updated.

However, this bug tracker is about documentation issues, and this one clearly isn't. Not quite sure what to do, since PECL/oci8 doesn't have its own bug tracker.

Anyhow, @cjbj, are you planning to publish a new PECL/oci8 version which is compatible with PHP 8.1?

from php-src.

cjbj avatar cjbj commented on May 14, 2024

@cmb69 I was hoping to release a PECL OCI8 version that supported several PHP 8 versions, however @nikic's 902d64390e4 from https://wiki.php.net/rfc/deprecate_dynamic_properties has just borked OCI8 tests that use OCILob or OCICollection, which will delay things.

How do I pass #[AllowDynamicProperties] from oci8.stub.php? It seems to be ignored. And is there a way to have the stub generator create version-dependent #ifdef code so that oci8_arginfo.h can be used with, e.g. 8.2 and 8.1?

from php-src.

cmb69 avatar cmb69 commented on May 14, 2024

Do OCILob and OCICollection use dynamic properties? If so, can't that be changed so they have declared properties or use read_property/write_property handlers. If that's not possible, I think that you need to add ZEND_ACC_ALLOW_DYNAMIC_PROPERTIES to the ce_flags. I don't know whether #[AllowDynamicProperties] will be supported for the stubs.

from php-src.

nikic avatar nikic commented on May 14, 2024

From a quick look at the code, OCILob only has a $descriptor property, which can be declared. Though in this particular case, $descriptor probably shouldn't be exposed as a property at all -- it looks like a purely internal resource that the user can't interact with. Normally, we'd store something like this in a custom zend_object extension rather than an opaque resource. (Would also help with the migration away from resources.)

Though in any case, I think it's a bit early to think about an 8.2 compatible extension release, given how 8.2 is still a year away.

from php-src.

cjbj avatar cjbj commented on May 14, 2024

Thanks for jumping in. I need to do a PECL release for 8.1, and I wanted to add the newest performance optimization feature which landed in 8.2.

The class code is all very old (pre dating me) and I haven't reviewed it for a long time. I don't know the answers to @cmb69's questions. Are the ce_flags controls via stubs?

@nikic can you expand on what 'which can be declared' means?

Thanks !
PS I'm out for a few days.

from php-src.

cmb69 avatar cmb69 commented on May 14, 2024

Instead of calling add_property_resource(), you'd call zend_declare_property_ex(), but as Nikita said, this property would better be avoided in favor of a custom zend_object extension (e.g. like https://github.com/php/php-src/blob/php-8.1.0/ext/gd/gd.c#L162-L165).

The ce_flags are a member of zend_class_entry; I don't think you can mark a class to allow dynamic properties via the stubs (yet).

from php-src.

cmb69 avatar cmb69 commented on May 14, 2024

OCI8 3.2 uses OCI_ATTR_LOBPREFETCH_LENGTH and OCI_ATTR_LOBPREFETCH_SIZE which are apparently not defined in instaclient 10.2; should I disable 10.2 builds for Windows?

from php-src.

cjbj avatar cjbj commented on May 14, 2024

@cmb69 I should have made the build cleaner but, yes, it's time to move forward and stop building with ancient Oracle Client libraries. Thanks for identifying this. Builds with 11.2+ should work.

from php-src.

cmb69 avatar cmb69 commented on May 14, 2024

Yes, 11.2+ builds succeed. I've updated rmtools and the PECL build machine, and triggered new builds. Thanks for the swift reply! :)

from php-src.

cjbj avatar cjbj commented on May 14, 2024

I'll release a OCI8 3.2.1 version which removes support for linking with Oracle Client 10. I don't have Windows so won't touch the config.w32 file.

from php-src.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.