I have been looking for a PHP framework for a project I'm currently working on. One of the primary requirements is an easy way to interact with our database. Initially this must be Oracle, but there is a possibility of switching to a different database back-end in the future. Hence, I want to be able to write code that is as database agnostic as possible.
I've initially been leaning toward CodeIgniter, mainly because of its Oracle support (it includes drivers that are written to take advantage of Oracle's own OCI8 drivers).
Laravel is another alternative that I've considered. It seems to be a popular option, even with some previous CodeIgniter users (for example, see this answer). However, its Oracle support seems very limited; as far as I can tell Laravel uses PDO extensively, but PDO for Oracle is experimental and not recommended.
Is there an easy way that I can connect to Oracle using Laravel in a database agnostic way?
I'm not sure this will solve all issues, but this packagist library should make Oracle work with Laravel.
Note that OCI8 may still present an issue, however :/
After researching the link provided by fideloper it looks like some helpful coder(s) have continued to develop a PDO user-space driver for Oracle that takes advantage of the native OCI8 PHP driver functions.
According to this website this can be installed in Laravel by using composer:
Then Laravel can access Oracle in a database-agnostic way using Eloquent etc. I've given this some basic testing it seems to work well.