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

Doctrine Datetime Bundle Laravel Package

sprintf/doctrine-datetime-bundle

A Symfony bundle that adds Doctrine DBAL datetime types and integration helpers, making it easier to map PHP DateTime values to database columns consistently. It wires custom types into Doctrine configuration so date and time handling stays predictable across entities.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The first thing a TPM must flag: despite being scoped as a "Laravel/PHP package," sprintf/doctrine-datetime-bundle is a Symfony bundle targeting Doctrine DBAL. It provides custom column types that map PostgreSQL date, datetime, and daterange to PHP values. Laravel's default persistence layer is Eloquent, which does not use Doctrine DBAL for query building or hydration. There is a narrow path where a Laravel team uses doctrine/dbal indirectly (schema introspection, some migration helpers), but custom type registration in that context is not the same as what a Symfony bundle wires up. Architecture fit for a standard Laravel stack: poor. Architecture fit for a Symfony + Doctrine stack: plausible.

Integration feasibility. Low as a bundle. The bundle's value is in (a) the custom DBAL type classes and (b) Symfony DI/configuration glue that auto-registers those types with DoctrineBundle. A Laravel team would only be able to reuse (a), and would have to register the types manually via doctrine.dbal.types config or Type::addType(). That reduces the "bundle" to a handful of type classes — worth checking whether copying them in-house is cheaper than the dependency.

Technical risk. High, on multiple axes:

  • Maturity signals: 1 GitHub star, 0 dependents, a single small vendor (Sprint-F.RU). No evidence of active maintenance, release cadence, or CI.
  • Version fragility: DBAL 3.x and 4.x materially changed the Type base class and type registration APIs. A package this small and this old is likely pinned to an older DBAL. A minor composer bump could break it.
  • Postgres range semantics: daterange is not a trivial scalar. Bounds may be inclusive/exclusive, infinite (infinity, -infinity), empty, and the PHP representation must round-trip. Timezone handling for datetime/timestamptz is a classic source of off-by-one-hour defects.

Key questions for the vendor or code review:

  1. Which DBAL versions are supported (composer.json constraints)? Which PHP versions?
  2. How does it represent a daterange in PHP — a value object, an array, a string passthrough? Does it preserve exclusive bounds and infinite bounds?
  3. Are timestamp without time zone and timestamptz distinguished, or conflated?
  4. Is there a test suite, and does it run against a real Postgres instance?
  5. Is this published on Packagist under the stated vendor name, and is there a tagged release?
  6. Who owns the maintenance if we adopt it?

Given the score of 0.005 alongside a higher "opportunity" signal (15.39), my read is: the problem (first-class Postgres range support) is real and underserved; this specific package is not the solution.

Integration Approach

Stack fit. Decide this before anything else:

  • Laravel + Eloquent: treat this package as not applicable. If Postgres range support is required, use native WHERE operators / raw expressions (@>, &&, daterange(...)) via whereRaw, or a dedicated range-aware query builder. Do not introduce Doctrine solely to get date types.
  • Laravel + Doctrine bridge (laravel-doctrine/orm): partial fit. Reuse the type classes; skip the bundle. Expect to own the wiring.
  • Symfony + Doctrine: only stack where the package works as designed — but the low maintenance signal still argues for forking.

Migration path. Recommended: fork-and-vendor. Copy the type classes into an internal App\Doctrine\Types namespace, register them explicitly, and write your own tests. This eliminates the supply-chain and version-coupling risk while retaining the value. If the team prefers the dependency, pin it exactly and add a composer audit gate.

Compatibility. Verify DBAL constraint against your installed version before committing. Confirm Type::convertToDatabaseValue / convertToPHPValue signatures match your DBAL major version — this is where silent breakage occurs. Also confirm the Postgres server version supports the range types you need (all modern versions do, but the driver layer matters).

Sequencing.

  1. Spike: 1–2 days, one engineer, prove round-trip of date, datetime, and daterange (including infinite and empty ranges) against a local Postgres.
  2. Decide fork vs. depend vs. build-in-house (expect ~2–3 days to write the type classes from scratch).
  3. Integrate behind a feature flag on one low-risk table.
  4. Broaden only after a full test pass on boundary semantics.

Operational Impact

Maintenance. Effectively zero upstream maintenance. With 1 star and 0 dependents there is no community to absorb bugs. Assume you own the code from day one regardless of whether you fork — the fork just makes that explicit. Budget a small but permanent ownership cost.

Support. None. No SLA, no issue triage, no security response. A TPM should treat this as "adopt with an internal owner named in the ticket," not "adopt as a dependency."

Scaling. The Postgres side scales fine; range types are indexable (GiST) and efficient. The concern is hydration overhead — converting range values to PHP objects on large result sets adds per-row cost versus raw strings. For read-heavy endpoints, benchmark. There is no caching layer in the package.

Failure modes.

  • DBAL/PHP upgrade breaks type registration → runtime Unknown column type exceptions, potentially on deploy.
  • Incorrect boundary handling → off-by-one-day availability or pricing bugs, which are user-visible and expensive.
  • Timezone drift on datetime → reports that disagree with the source database.
  • Silent null or infinity mishandling → wrong query results rather than errors, the worst failure class.

Ramp-up. Low. The codebase is small and the concepts (DBAL custom types, Postgres ranges) are well documented. One engineer can be productive in a day. The risk is not learning curve; it is undocumented edge-case behavior, which requires test-writing to discover.

Recommendation. Do not adopt as a live dependency in a Laravel-primary codebase. Either vendor the type classes with an internal owner and a test suite covering range boundaries and timezones, or spend the comparable effort building the three types in-house. The opportunity signal is worth tracking — Postgres range support is a genuine gap — but this package is a reference implementation, not a supported product.

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.
elsayed85/laravel-api-exceptions
ouhssini/laravel-demo-mode
daworks/ncloud-outbound-mailer-driver
gp247/cms
ignibyte/aic-gates
nexa-merchant/blog
novasa/laravel-language-center
opencage/geocode
adolfoholzer/parameters
livenetworks/ln-starter
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
cgv/localized-resource