hyperf/database
Hyperf Database brings Laravel-style query builder, ORM, migrations, and connection pooling to Hyperf. Coroutine-safe and PDO-based, it simplifies MySQL/PostgreSQL access in Swoole apps with models, pagination, transactions, and schema tooling.
Scope note: v3.2.5 is the only release artifact available and it contains no changelog entries — only a compare link (v3.2.3...v3.2.5). No prior assessment exists for this package. Everything below is therefore a baseline assessment built on package identity and release hygiene, not on release content. It should be treated as provisional until the diff is reviewed.
Architecture fit: The package under review is hyperf/database, the database/ORM component of the Hyperf coroutine framework, not a first-party Laravel package. This is the single most important finding. Its API surface is derived from illuminate/database, so Eloquent-style code will look familiar, but its runtime assumptions — long-lived workers, coroutine-local context, connection pooling — are the inverse of Laravel's request-per-process model. For a Laravel application, illuminate/database is the native, supported path; introducing hyperf/database alongside it means two ORM stacks, competing model base classes, and duplicated service-provider wiring. Genuine architectural fit exists only if the target is a Hyperf (Swoole/Swow) service, or a Laravel app being deliberately ported toward coroutine runtime.
Integration feasibility: Technically installable via Composer in isolation. Feasibility inside a Laravel app is low-to-moderate and not justified by anything in this release. Feasibility inside a Hyperf service is high but should be pinned rather than floated, given the absence of release documentation.
Technical risk: The release notes are the risk. A patch bump from 3.2.3 to 3.2.5 with an empty changelog means we cannot determine whether the contained commits are bug fixes, dependency bumps, connection-pool adjustments, or correctness fixes in query building/transaction handling. Database layers are exactly the wrong place to accept "unknown contents" — a silent change to transaction or connection semantics surfaces as data corruption or pool exhaustion, not as a clean error. Note also that the compare range skips a tag (3.2.4), suggesting either an unannounced intermediate release or a retagged version; either warrants a maintainer answer. Secondary risk: upstream maintainer concentration and release cadence typical of framework-adjacent components.
Key questions:
illuminate/*/PSR dependency ranges does 3.2.5 constrain, and do they conflict with the host application?Stack fit: Proceed only against a Hyperf runtime, or against a Laravel codebase where the ORM swap is an explicit, separately-funded migration goal. If the intent was "add a database helper to our Laravel app," this is the wrong package and the evaluation should stop here — recommend illuminate/database or a narrower, single-purpose library.
Migration path: There is no incremental path from Laravel's Eloquent to this package that stops halfway; models, repositories, migrations, and DB facades all move together. Treat any adoption as a contained pilot behind an interface boundary (repository/adapter layer) so the ORM is swappable, not spread across controllers. Do not attempt a partial migration.
Compatibility: Two hard constraints to verify before any code is written: (a) PHP version floor and any Swoole/Swow extension requirement; (b) the pinned illuminate/database derivative version, which must not be allowed to coexist with the framework's own copy. Composer's conflict resolver is the gate here — if it will not resolve cleanly on a fresh install, that is the answer.
Sequencing:
Maintenance: Low-cost if adopted in a Hyperf codebase, where upgrades track the framework. High-cost if adopted in Laravel, where the team inherits responsibility for reconciling two ORM cultures and will pay that tax on every PHP and framework upgrade. The empty changelog raises the ongoing cost further: every version bump becomes a code-review exercise rather than a release-note read. Budget for that explicitly.
Support: Upstream support is community-style. There is no vendor SLA. Internal ownership must be named before adoption — a specific engineer accountable for ORM-level issues — because debugging pooled, coroutine-local database state is not a skill the team acquires incidentally.
Scaling: The scaling story is the reason to consider this package and the reason to be cautious. Connection pooling and persistent connections change the failure profile: connection-per-request assumptions in existing code (transaction scoping, DB::transaction() nesting, temporary tables, session state) will be wrong in a pooled, long-lived-worker model. These defects typically appear under concurrency, not in development. Capacity planning must account for pool size versus worker count versus database max_connections — a ratio that, if misconfigured, saturates the database rather than the application.
Failure modes to instrument for:
Ramp-up: Assume two to three weeks before a mid-level engineer is productive and considerably longer before they can diagnose pool- and coroutine-level faults. The Eloquent-like API creates a false-familiarity trap: syntax transfers, runtime semantics do not. Plan for onboarding material covering connection lifecycle and coroutine-local state, and for at least one engineer to read upstream source rather than documentation.
Recommendation: Conditional no-go on v3.2.5 pending (1) confirmation of target runtime and (2) a reviewed diff. If the target is Laravel, reject on architecture fit. If the target is Hyperf, pin to 3.2.5 only after the diff review, and treat the missing changelog as a standing operational risk rather than a one-off annoyance.
How can I help you explore Laravel packages today?