Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Db Oracle Laravel Package

yiisoft/db-oracle

Oracle driver for Yii Database, bringing Oracle support to yiisoft/db. It provides schema introspection, query building, transactions, and ActiveRecord integration so Yii applications can work with Oracle databases through the familiar database abstraction layer.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

What this release actually is. The changelog is for yiisoft/db-oracle 2.0.0 — the Oracle driver for the Yii3 database abstraction layer (yiisoft/db). It is not a Laravel package and does not integrate with Eloquent, the query builder, or Illuminate\Database. Any assessment of "fit" for a Laravel codebase has to start from that fact: this is a PDO/OCI8 driver that implements the yiisoft/db contracts (ConnectionInterface, SchemaInterface, QueryBuilderInterface, CommandInterface, ColumnInterface), and it is consumed either inside a Yii3 application or standalone with a small amount of Yii DI/container wiring.

Architecture fit.

  • Fit for a Yii3 service: high. 2.0.0 is the version that aligns the Oracle driver with the rewritten yiisoft/db core, so it is effectively mandatory for anyone on the new core.
  • Fit for a Laravel service: low as a primary data path, acceptable as a secondary, read-mostly Oracle connection for reporting, legacy ERP integration, or migration extraction jobs. Laravel teams typically reach for yajra/laravel-oci8 or raw oci8/PDO for that; adopting yiisoft/db-oracle means running two independent DB abstractions side by side.
  • Architectural direction is sound: the release moves Oracle type handling into a proper object model (ColumnInterface implementations per DB type, ColumnFactory, ColumnBuilder → ColumnDefinitionBuilder → ColumnDefinitionParser, SqlParser). That is a meaningful investment in correctness of schema introspection and DDL generation, which is historically where Oracle drivers rot.

Integration feasibility.

  • Technically feasible in a Laravel app: yiisoft/db is framework-agnostic, PHP 8.1+, and can be instantiated directly. The cost is dependency weight (Yii DI, cache, var-dumper, etc.), a second connection/transaction model, and two schema-introspection code paths in one repo.
  • Requires the oci8 PHP extension and Oracle Instant Client on every host and in CI images. That is the dominant operational gate, not the package itself.
  • 2.0.0 is a hard-coupled major: it will only work against the matching yiisoft/db 2.x. Mixed 1.x/2.x pins across packages in the same vendor tree will not resolve.

Technical risk (2.0.0 specific). This is a breaking release with an unusually large blast radius — treat it as a rewrite of the driver's public surface, not an upgrade:

Change Risk
ColumnSchemaInterface renamed to ColumnInterface; old ColumnInterface removed (#296, #298) Any custom column/type class must be rewritten
TableSchema class removed (#348) Code touching table metadata directly breaks
batchInsert() → insertBatch(), parameters reordered to $table, $rows, $columns = [] (#268) Silent-behaviour risk if call sites are updated mechanically without re-checking argument order
insertWithReturningPks() → insertReturningPks() (#330) Rename-only, low risk
dropTable() gains $ifExists, $cascade (#307) Interface break for implementors/mocks
Minimum PHP raised to ^8.1, supported 8.1 – 8.5 (#277, #306) Drops PHP 8.0 hosts; validate target runtime and CI matrix
"unsigned" column usage now throws (#378) Runtime exceptions on previously tolerated schemas; must be caught at schema-introspection time
getCacheKey()/getCacheTag() removed from Schema (#315) Any app-level schema caching keyed off these silently loses its cache strategy
Yiisoft\Db\Exception\InvalidArgumentException → \InvalidArgumentException (#332) Catch blocks must be widened
Expression namespace moves (#365), QueryBuilder constructor change (#294), Dsn refactor (#283, #344) Wiring/config code needs revisiting
Quoter now owns getRawTableName() (#272) Call sites referencing schema for raw names break

Net: high upgrade cost, low steady-state risk. The feature additions (JSON type support #303, enumeration columns #382, boolean #319, collation #352, caseSensitive LIKE option #311, typed DateTimeColumn #323, ArrayMergeBuilder/LongestBuilder/ShortestBuilder #357) are genuinely useful for Oracle shops, but they are not free — they land together with the breaking renames.

Key questions for the vendor/owning team.

  1. Is yiisoft/db-oracle 2.0.0 pinned to a specific yiisoft/db minor, and is the compatibility range documented? (#336's yiisoft/db-implementation virtual package suggests provider-style resolution — confirm how it behaves with Composer 2.)
  2. Which Oracle server versions are covered by CI? Enum (#382), JSON (#303), and collation (#352) support map to different Oracle server minimums.
  3. Is there a maintained 1.x branch for security/critical fixes, and for how long?
  4. Are there published upgrade notes beyond the changelog (interface mapping tables, codemod guidance for the column refactor)?
  5. What is the support model — volunteer-maintained, single-primary-maintainer (@Tigrov authors the large majority of changes), or commercially backed? Bus-factor is the single biggest concern with this dependency.

Integration Approach

Stack fit.

  • If the target is a Yii3 service: upgrade is essentially forced once yiisoft/db moves to 2.x. Plan it as a scheduled migration, not an opportunistic bump.
  • If the target is Laravel: recommend not making this the primary DB layer. Acceptable pattern is a bounded "Oracle adapter" module — a small internal service class that owns the yiisoft/db-oracle connection, exposes typed repository methods, and never leaks Yii types into controllers/jobs. Eloquent remains the system of record for the app database; Oracle access is explicit and contained.
  • If the target is neither: evaluate yajra/laravel-oci8 or Doctrine DBAL's Oracle platform first; they carry far less ecosystem coupling for a Laravel shop.

Migration path (1.x → 2.0.0). Sequence matters more than speed:

  1. Pin and freeze. Snapshot current 1.x behaviour with an integration test suite against a real Oracle instance: schema introspection output, generated DDL, insert/upsert/returning behaviour, and type mappings. This suite is the acceptance gate; without it the rename-heavy changelog is unverifiable.
  2. Upgrade the core first. Move yiisoft/db to the matching 2.x line, then the driver, in the same PR. Do not stagger.
  3. Mechanical renames, in this order: ColumnSchemaInterface→ColumnInterface, insertWithReturningPks→insertReturningPks, batchInsert→insertBatch (with explicit argument-order review at every call site), exception class replacement.
  4. Structural work: remove TableSchema usage, move raw-table-name lookups to QuoterInterface, rebuild custom columns against the new ColumnInterface/ColumnFactory, re-establish schema caching without getCacheKey/getCacheTag.
  5. Behavioural verification: scan for "unsigned" column definitions and decide whether to normalise them upstream in Oracle DDL or catch the new exception; re-test dropTable call sites now that $ifExists/$cascade exist (good opportunity to make teardown in test fixtures idempotent).
  6. Adopt new capabilities deliberately, after stabilisation: JSON columns, enum columns, collation, caseSensitive LIKE. These are net-new behaviour and should not be bundled into the compatibility upgrade.

Compatibility checks before any code moves.

  • PHP runtime floor 8.1, ceiling 8.5 — verify CI images, Docker base images, and any shared hosting constraints.
  • oci8 + Oracle Instant Client version alignment on dev, CI, staging, prod.
  • Composer resolution across the whole yiisoft/* set; expect a coordinated lockfile bump.

Sequencing recommendation. Treat 2.0.0 adoption as its own workstream with a two-week spike: (a) stand up the driver against a schema-copy Oracle instance, (b) run the introspection baseline suite from step 1, (c) produce a call-site inventory of the renamed/removed APIs. Decide go/no-go on the spike output, not on the changelog.

Operational Impact

Maintenance.

  • Upside: 2.0.0's internal restructuring (factory/builder/parser split, type-specific column classes) is exactly the shape that makes future Oracle type support incremental rather than invasive. Expect smaller per-feature diffs going forward.
  • Downside: the package has a history of frequent, breaking-change-heavy releases. Budget for at least one non-trivial upgrade per year, and keep the integration test suite as a permanent asset — it is the only thing that makes those upgrades cheap.
  • Version pinning policy: pin to ~2.0.0 initially, widen only after the package has had a few patch releases and the ecosystem settles.

Support.

  • Community/volunteer project with a concentrated contributor base. No vendor SLA. For a production Oracle dependency, that means: internal ownership must be explicit (a named engineer who can read the driver source), and there should be a documented fallback (raw oci8 queries, or Doctrine DBAL) if a critical Oracle incompatibility appears and is not patched promptly.
  • The yiisoft/db coupling means a bug in the core can block the driver; you inherit the core's support characteristics too.

Scaling.

  • Performance should improve modestly and predictably: typed ColumnInterface classes remove per-row type-checking overhead (#236, #349, #275), the SqlParser (#255, #321) reduces regex-based introspection cost on large schemas, prepareBinary() override (#292) helps LOB handling, and insertBatch with Traversable support (#260) enables streaming bulk loads.
  • Realistic expectation: gains are on connection/schema-introspection and bulk-write paths, not on ordinary SELECT throughput. Measure against your own workload; do not commit to numbers from the changelog.
  • Schema introspection on very large Oracle schemas remains the practical scaling bottleneck; the new factory/parser pipeline is the mitigation, so validate cold-start introspection time explicitly.

Failure modes to instrument.

  • Introspection regressions on exotic column types — the column refactor is broad; the parser change (#383, parentheses fix) shows this area is still settling. Add a startup-time schema-load smoke test.
  • unsigned exception at runtime (#378) — can surface as a hard failure on an otherwise-working schema. Fail fast at deploy, not at request time.
  • Silent argument-order errors from the insertBatch signature change — no type error if call sites pass $table, $columns, $rows as before; watch for garbled bulk inserts in staging.
  • Lost schema caching after getCacheKey/getCacheTag removal — manifests as latency creep, not errors; monitor introspection call counts.
  • Enum/JSON/collation behaviour mismatch on older Oracle servers — gate feature use behind an explicit server-version check.
  • Dependency resolution failures mid-upgrade leaving the tree on a mixed 1.x/2.x state — enforce atomic lockfile updates in CI.

Ramp-up.

  • For a Laravel-only team: 1–2 weeks to be productive. The learning curve is Yii3 idioms (DI container, interface-driven schema/command/query-builder separation), not SQL. The absence of Eloquent-style conveniences (no migrations, no model layer, no relationship loading) is the main adjustment.
  • For anyone maintaining custom column types: add another 1–2 weeks for the ColumnInterface/ColumnFactory rewrite plus the ColumnDefinitionBuilder/Parser model.
  • Mitigation: keep the Oracle adapter module small and documented, nominate two owners rather than one, and write the internal "how to add support for a new Oracle type" runbook while the 2.0.0 changes are fresh — that runbook is the durable deliverable from this upgrade, more so than the feature list.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox