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

Fluent Laravel Package

laravel-doctrine/fluent

Laravel Doctrine Fluent provides a fluent PHP mapping driver for Doctrine ORM entities, letting you configure entity mappings with a clean, expressive API instead of annotations, XML, or YAML files.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Package: laravel-doctrine/fluent — a fluent PHP mapping driver for Doctrine ORM entities, used alongside laravel-doctrine/orm in Laravel applications that prefer code-based mapping over attributes/XML/YAML.

Architecture fit

  • Narrow, well-bounded responsibility: the package registers an EntityManager metadata driver. It does not own persistence, connection management, or the Laravel integration layer — those remain with laravel-doctrine/orm and doctrine/dbal.
  • Low architectural blast radius in principle, but its version constraints are transitively decisive: the mapping driver dictates which DBAL/ORM majors the whole persistence stack can use.
  • Fits cleanly into existing Laravel service-provider bootstrapping; no queue, cache, or HTTP middleware surface.

Integration feasibility

  • Straightforward to adopt in greenfield: composer require laravel-doctrine/fluent, register the driver, point Doctrine at it.
  • 3.0.0's headline change — DBAL 4 support — is really a compatibility release. Its practical meaning is that this package now tracks Doctrine's modern major line rather than pinning the application to DBAL 3.
  • The stated "php 5 support" is almost certainly a typo for a modern PHP minor (DBAL 4 requires PHP 8.1+, so literal PHP 5 support is impossible). This must be resolved before any planning decision.

Technical risk

  • Major version bump = presumed breaking changes. The changelog is a single PR with no migration notes; nothing describes what Fluent API surfaces changed. Semver alone justifies treating this as breaking.
  • Transitive major upgrades. Adopting 3.0.0 forces doctrine/dbal ^4 and, by extension, the corresponding doctrine/orm major. The real migration cost is concentrated in ORM/DBAL, not in Fluent itself: custom DBAL types, platform detection, schema tooling, and any hand-rolled repository SQL.
  • Ecosystem lag. Any other package pinned to DBAL 3 (audit logs, Doctrine extensions, admin panels, migration tooling) becomes a blocker. laravel-doctrine/orm must have a DBAL-4-compatible release available.
  • Thin release documentation. No changelog detail, no upgrade guide, no stated minimum PHP or Laravel version. Release quality signal is weak.

Key questions

  1. Is "php 5" a typo, and if so which PHP version is actually the floor? What are the real composer.json constraints for php, doctrine/dbal, doctrine/orm, and illuminate/support?
  2. Which laravel-doctrine/orm release pairs with Fluent 3.0.0?
  3. Were there any changes to the Fluent mapping API itself, or is this dependency-only? A dependency-only major is a very different risk profile.
  4. Does a supported upgrade path exist for existing 2.x mappings, or is it a lift-and-shift?
  5. Is the 3.0.0 tag covered by CI across the supported PHP/Laravel matrix?

Integration Approach

Stack fit

  • Assumes a Laravel application on a currently supported PHP line, using laravel-doctrine/orm for container wiring and this package purely as the metadata driver.
  • Best fit for teams that want entity mappings in version-controlled PHP rather than docblock attributes — particularly where mappings are generated or composed programmatically.

Migration path

  • Treat 3.0.0 as a persistence-stack upgrade project, not a routine dependency bump. Fluent is the smallest piece; the effort is DBAL 3 → 4 and the coupled ORM major.
  • Inventory first: enumerate every direct and transitive consumer of doctrine/dbal and doctrine/orm in composer.lock. Any package without a DBAL-4-compatible release halts the upgrade.
  • Do the upgrade on a branch with a strict composer why-not doctrine/dbal ^4 loop until the graph resolves cleanly.
  • Expect remediation work in: custom DBAL type classes, schema/migration code using removed DBAL APIs, and any raw SQL relying on platform-specific behaviour.

Compatibility

  • Verify the full trio resolves together: Fluent 3.0.x + compatible laravel-doctrine/orm + DBAL 4 + ORM major. Partial resolution (e.g. Fluent 3 with an ORM still on DBAL 3) is not a valid state.
  • Confirm PHP floor against the application's runtime and CI images.
  • If the application must stay on DBAL 3 for any dependency reason, pin Fluent to ^2.0 deliberately and record it as accepted technical debt with a review date.

Sequencing

  1. Read composer.json at the 3.0.0 tag and the full diff against 2.0.1 — the changelog is insufficient on its own.
  2. Confirm laravel-doctrine/orm compatibility and lock an explicit version pair.
  3. Spike the dependency resolution in isolation before touching application code.
  4. Upgrade DBAL/ORM, run the full test suite plus doctrine:schema:validate and a metadata cache warm.
  5. Switch Fluent to ^3.0, re-validate mappings, then run a staging migration dry-run against a production-like schema.
  6. Roll out behind a release branch with a documented one-command revert to the 2.0.1 lockfile.

Operational Impact

Maintenance

  • Low ongoing surface: mapping definitions are declarative and change only when entities change. No runtime services to tune.
  • The maintenance burden that matters is version-tracking discipline — this package now sits on Doctrine's fast-moving major line, so expect periodic coordinated upgrades rather than independent bumps.
  • Keep Fluent, laravel-doctrine/orm, DBAL, and ORM versioned as a single unit in the dependency policy.

Support

  • Upstream is a small community package with a single-maintainer release cadence and terse changelogs. Assume no vendor support and plan for internal ownership of the mapping layer.
  • Budget for reading source diffs at each major; do not rely on release notes being complete.
  • Pin exact versions in composer.lock and avoid floating constraints on this dependency.

Scaling

  • Negligible runtime scaling impact — metadata is parsed once and cached. The only scaling-adjacent concern is metadata cache invalidation across multiple app instances: mapping changes require a coordinated cache clear, or instances will run divergent schemas of the entity model.
  • Standardise a deploy step that clears and warms the Doctrine metadata cache whenever mapping code changes.

Failure modes

  • Metadata cache staleness after a mapping edit — silently serves old mappings; manifests as phantom column/relation errors.
  • Driver misconfiguration — Doctrine falls back to a different driver or reports "not a valid entity", which surfaces as a confusing class-not-found at runtime rather than at boot.
  • Partial dependency upgrade — Fluent upgraded while ORM/DBAL lag, producing resolution conflicts or runtime type errors deep in the persistence layer.
  • Custom DBAL type breakage post-DBAL-4 — often silent at write time, visible only on read or in schema diffs. Cover with round-trip tests on custom types.
  • Rollback hazard — schema/migration changes made under DBAL 4 may not reverse cleanly to DBAL 3; validate rollback on staging.

Ramp-up

  • Small API surface; a Laravel developer comfortable with Doctrine can be productive with Fluent mappings in under a day.
  • The real ramp-up cost is Doctrine major-version literacy for whoever owns the upgrade — DBAL 4 and the ORM major carry the learning curve, not this package.
  • Assign a single owner for the persistence stack and require an upgrade runbook before 3.0.0 goes to production.
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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin