开发者

Which PHP ORM works with Oracle and does not require PDO_OCI?

开发者 https://www.devze.com 2023-03-21 15:39 出处:网络
I would like to use an ORM but 开发者_Go百科unfortunately there is no stable PDO for our database (Oracle).The PHP page states that the PDO_OCI extension is \"EXPERIMENTAL\" and warns against using it

I would like to use an ORM but 开发者_Go百科unfortunately there is no stable PDO for our database (Oracle). The PHP page states that the PDO_OCI extension is "EXPERIMENTAL" and warns against using it.

It seems that both Doctrine and Propel require PDO. What do other Oracle/PHP shops use for ORM in production?


Doctrine 2 supports OCI8 out of the box.

For Doctrine 1.2 you will have to implement your own connection class using the OCI8 extension (the only one actively supported by Oracle). Chances are, you will find a custom class at GitHub or by googling for it.

As for Propel, there is an entry in the Propel Newgroups asking for it:

  • https://groups.google.com/group/propel-users/browse_thread/thread/9977c9556beaf1ac

Unfortunately Propel requires PDO and PDOStatement as parameters throughout the API, so the best choice ist to extend PropelPDO and PDOStatement and reimplement the needed methods with oci8.

and

In theory, you could use Propel 1.2.x, since this uses oci8 rather than pdo_oci.


The PDO_OCI extension is technically "EXPERIMENTAL", but b'jillions (hyperbole) of people (myself included) are using it every day on production systems without a problem. It's over 6 years old and quite stable.


How about OCI8?

BTW you have to distinguish between the driver that is communicating with the DBMS and an ORM that is using the driver.

0

精彩评论

暂无评论...
验证码 换一张
取 消