yajra/laravel-oci8
Oracle database driver for Laravel using the PHP OCI8 extension. Adds an Illuminate/Database-compatible Oracle connection with Laravel version support (5.1+ through 13), plus optional PHPStan/Larastan helpers for OCI8-specific DB methods.
Pros:
Illuminate\Database with Oracle-specific optimizations (e.g., sequence handling, JSON support for 12c+, identity columns for 12c+).ROWNUM vs. FETCH FIRST, JSON read-only support) that Laravel’s default drivers lack.DROP IF EXISTS, trigger/sequence wrapping, table comments).Cons:
oci8 extension (not bundled with PHP), adding a deployment dependency.LIMIT/OFFSET emulation, JOIN LATERAL support).config/database.php to route connections (e.g., oracle for Oracle tables, mysql for legacy systems).whereJsonContains) may need manual overrides for Oracle.oci8 extension is installed and configured correctly (e.g., Oracle client libraries, ORACLE_HOME).ROWNUM emulation for pagination or LIMIT/OFFSET can degrade performance on large datasets.DB_RETRY_COUNT).ORA-00942 for missing privileges).oci8 extension be installed on all environments (CI/CD, staging, production)?dynamic config option may be needed..env files, secrets managers)?mysql/pgsql drivers with Oracle support. No changes to Eloquent or Query Builder syntax are required for basic CRUD.oci8 (PHP extension) and Oracle client libraries. Ensure:
php-oci8 is installed (e.g., pecl install oci8 or via package manager).ORACLE_HOME is set if using instant client.migrate, schema:dump, and db:show for Oracle.DatabaseMigrations or DatabaseTransactions traits with Oracle.oci8 extension and Oracle client libraries.config/database.php with Oracle connection details (see README for examples).php artisan vendor:publish --tag=oracle) if customization is needed.php artisan tinker → DB::connection('oracle')->getPdo()).php artisan migrate).DB_RETRY_COUNT) for transient failures.ORA-01017 for authentication) to a monitoring system.DB::select() results).Schema::create() with identity (12c+) or manual sequence triggers.whereRaw or the Oracle user provider for auth.ROWNUM or FETCH FIRST (configurable via DB_SERVER_VERSION).oci8 extension before adding the package to composer.json.DB_SERVER_VERSION).aws-database-migration-service or custom scripts to translate DDL.php artisan migrate --pretend.rollback() for all operations (e.g., DROP TABLE without IF EXISTS).SAVEPOINT may behave differently)..env or config/database.php, reducing hardcoded values.oci8 and Oracle client libraries is external to this package.ORA-00942) may require custom fixes.Illuminate\Database\QueryException).How can I help you explore Laravel packages today?