ecphp/doctrine-oci8-bundle
Symfony bundle (PHP 7.4+, Symfony 4.4+) that automatically configures Doctrine DBAL to use the ecphp/doctrine-oci8 OCI8 driver for Oracle databases. Install it and it works out of the box with no additional configuration.
Pros:
ecphp/doctrine-oci8 driver under the hood, which is a maintained fork of the official OCI8 extension with Doctrine-specific optimizations (e.g., type handling,LOB support).CLOB, BLOB) via Doctrine’s Oracle platform.Cons:
pecl install oci8). This adds DevOps overhead for Docker/Kubernetes deployments..env support for Oracle credentials). Relies on Symfony’s dependency injection.Laravel Stack Fit:
laravel-doctrine/orm) or Doctrine Bundle (e.g., dama/doctrine-test-bundle), this bundle will integrate seamlessly. For pure Eloquent users, adoption of Doctrine ORM is required.config/doctrine.php).doctrine/doctrine-migrations-bundle) for schema changes, which may require migration from Laravel’s native migrations.Key Dependencies:
php.ini (extension=oci8). For Docker, this requires custom Dockerfile layers (e.g., RUN pecl install oci8).symfony/dependency-injection (already present in Laravel via Symfony components).High:
ecphp/doctrine-oci8 driver is a fork, but its last update (2021) lags behind Oracle’s official releases.Mitigation Strategies:
QueryLogger) to compare performance with native OCI8.Database Strategy:
DevOps Readiness:
Long-Term Viability:
ecphp/doctrine-oci8 driver actively maintained? If not, what’s the fallback plan (e.g., official OCI8 + custom Doctrine types)?Alternatives:
fruitcake/laravel-oci8) that offer tighter integration?Assessment Phase:
Dependency Setup:
ecphp/doctrine-oci8 driver:
composer require ecphp/doctrine-oci8-bundle ecphp/doctrine-oci8
php.ini or Dockerfile:
RUN pecl install oci8 && docker-php-ext-enable oci8
Doctrine Configuration:
config/doctrine.php (if not using Symfony’s autoconfiguration):
return [
'dbal' => [
'connections' => [
'default' => [
'url' => 'oci8://user:pass@host:port/service_name',
'driver' => 'oci8',
// Oracle-specific options
'wrapperClass' => \Doctrine\DBAL\Driver\OCI8\OCI8Connection::class,
],
],
],
];
laravel-doctrine/orm), follow the package’s Oracle setup guide.Entity Mapping:
// Eloquent
class User extends Model { ... }
// Doctrine
/** @Entity */
class User {
/** @Id @GeneratedValue @Column(type="integer") */
private $id;
// ...
}
doctrine/orm:convert-mapping) to automate migrations.Testing:
CLOB handling, transactions).oci8 (no fallback to PDO_OCI).beberlei/DoctrineExtensions) if they override OCI8 behavior.Phase 1 (Low Risk):
doctrine:query CLI tool).Phase 2 (Medium Risk):
Phase 3 (High Risk):
Phase 4 (Optimization):
Pros:
Cons:
How can I help you explore Laravel packages today?