carbonphp/carbon-doctrine-types
Doctrine DBAL type mappings for Carbon, extracted from Carbon into a standalone package so each DBAL version can be supported cleanly. Adds date, datetime, and time types for using Carbon in Doctrine entities.
Architecture fit is unchanged and remains highly conditional on Doctrine ORM usage. This package is irrelevant for standard Laravel projects using Eloquent ORM (Laravel's default), as it exclusively targets Doctrine DBAL. Integration feasibility is high only for existing Doctrine-based projects; for Eloquent-based Laravel apps, it would require a full ORM migration (non-trivial effort). Release 3.2.1 is a narrow patch — "Fix PHP 8.6 compatibility" — with no new features, no deprecations, and no public API changes; it does not alter the architecture-fit conclusion or the integration effort estimate. The one technical delta is a raised forward-compatibility ceiling: the package now tolerates PHP 8.6 (an unreleased/upcoming runtime), which removes a future upgrade blocker and slightly lowers the risk of the package being stranded when the project advances PHP versions. Existing technical risks persist: potential incompatibility with Laravel's timezone configuration if Doctrine is used alongside Laravel (e.g., via laravel-doctrine bridge), and repository status still listed as "unknown," which continues to raise maintenance concerns despite this release. Key questions: 1) Is the project using Doctrine ORM or Eloquent? 2) What Doctrine DBAL version is in use? 3) How are current date columns stored (e.g., DATETIME vs TIMESTAMP)? 4) Are there existing timezone-handling conventions that might conflict with Carbon's behavior? 5) Is the project planning a PHP 8.6 upgrade in the next 12–18 months (i.e., does this patch have near-term value, or is it purely forward-looking)?
Stack fit is unchanged: strong only for Doctrine-centric applications (e.g., Symfony or custom PHP projects using Doctrine). For Laravel, it would require replacing Eloquent with Doctrine via a bridge package (e.g., laravel-doctrine/orm), which introduces significant complexity and is not justified by a patch-level compatibility fix. Migration path is unchanged: 1) Switch ORM if not already using Doctrine, 2) Update entity properties from DateTime to Carbon types, 3) Register CarbonType and CarbonImmutableType in Doctrine's type registry. Compatibility depends on Doctrine DBAL ≥2.13 and PHP ≥8.0; 3.2.1 additionally covers PHP 8.6, so no constraint changes are needed for current deployments — treat 8.6 support as headroom, not a driver. Sequencing must still prioritize ORM adoption before attempting this package; no incremental adoption path exists for Eloquent projects. If a PHP 8.6 upgrade is on the roadmap, pin to ≥3.2.1 at that time rather than upgrading now for its own sake.
Maintenance burden is moderate. The package has a modest star count (~210) and an "unknown" repository status, which limits community support and long-term reliability. The 3.2.1 release is a positive but weak maintenance signal: it demonstrates the package is still being touched and that the maintainer is tracking upstream PHP releases, but a single forward-compat patch does not resolve the underlying bus-factor and governance concerns flagged previously, nor does it confirm a support policy, release cadence, or security-response process. Support risks include limited community answers, a small contributor base, and the possibility that a future Doctrine DBAL or PHP breaking change is addressed slowly; the PHP 8.6 fix reduces one specific version-drift risk but does not de-risk the dependency generally. Scaling is not materially affected — the package is a thin type-mapping layer with negligible runtime overhead, and the patch introduces no performance or behavioral change to date handling. Failure modes remain: silent timezone drift between Laravel's app.timezone config and Doctrine-managed connections, incorrect round-tripping when columns are TIMESTAMP rather than DATETIME, and loss of custom type configuration on Doctrine/cache rebuilds. Ramp-up for the team is low (a handful of type registrations and entity annotations), but the real ramp cost sits in the ORM decision, not this package. Recommended mitigation: pin an explicit version, add a date-round-trip test against the actual column types, and set a review checkpoint to reassess maintenance health — or plan to vendor/fork the type classes, which are small enough to own outright — if no further releases appear over the next two to three quarters.
How can I help you explore Laravel packages today?