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.
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:
Sprint-F.RU). No evidence of active maintenance, release cadence, or CI.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.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:
composer.json constraints)? Which PHP versions?daterange in PHP — a value object, an array, a string passthrough? Does it preserve exclusive bounds and infinite bounds?timestamp without time zone and timestamptz distinguished, or conflated?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.
Stack fit. Decide this before anything else:
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/orm): partial fit. Reuse the type classes; skip the bundle. Expect to own the wiring.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.
date, datetime, and daterange (including infinite and empty ranges) against a local Postgres.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.
Unknown column type exceptions, potentially on deploy.datetime → reports that disagree with the source database.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.
How can I help you explore Laravel packages today?