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

Common Bundle Laravel Package

elcweb/common-bundle

Elcweb CommonBundle is a small Symfony bundle that adds a UTCDateTimeType Doctrine DBAL type, letting you store all DateTime values as UTC through a simple config.yml entry. Install via Composer and override the datetime type. MIT licensed.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • The package is a Symfony bundle (Elcweb\CommonBundle), not a Laravel package. It relies on Symfony's bundle registration and config.yml conventions, so it does not fit a Laravel application's service provider / package discovery model.
  • The only documented capability is a Doctrine DBAL custom type, Elcweb\CommonBundle\DBAL\Types\UTCDateTimeType, which forces DateTime values to be persisted as UTC. That is a small, framework-agnostic class wrapped in Symfony plumbing.
  • For a Laravel stack, the useful artifact is the ~30-line DBAL type, not the bundle. Doctrine DBAL is present in many Laravel apps (via doctrine/dbal or Laravel Doctrine), but custom types are registered through Doctrine configuration, not through a Symfony bundle.
  • Net: low architectural value as a dependency; moderate value as a reference implementation or copy-in snippet.

Integration feasibility

  • composer require elcweb/common-bundle will resolve in a Laravel app only if its PHP/Doctrine constraints are satisfied; the package provides no Laravel service provider, facade, or config publishing.
  • Feasible path is extraction: copy the UTCDateTimeType class into application code, register it with Doctrine's Type::addType() / doctrine.dbal.types config, and drop the bundle dependency.
  • The concept itself is well-trodden; the same behavior is achievable with a handful of lines and no third-party code.

Technical risk

  • High abandonment risk. Last release 2020-11-05, 0 stars, 0 dependents, no evidence of an active maintainer. The Travis badge points at travis-ci.org, which is effectively retired, so build status is unverifiable.
  • Version drift. A 2020-era Doctrine type likely targets DBAL 2.x. DBAL 3 changed type registration (getName() is deprecated in favor of explicit registration names) and DBAL 4 removes it outright; PHP 8.x compatibility is unconfirmed. Installing this in a modern Laravel app risks constraint conflicts or runtime Error on type registration.
  • Single-purpose surface. There is little to audit, but also little to justify a dependency. Risk is concentrated in silent date/time misbehavior rather than security exposure.
  • Licensing is clean (MIT), so forking or copying is viable.

Key questions

  1. What are the php and doctrine/dbal version constraints in composer.json, and do they admit DBAL 3.x/4.x?
  2. Is UTCDateTimeType the entire package, or are there undisclosed helpers referenced by "common tools/libs"?
  3. Does the type handle both convertToDatabaseValue and convertToPHPValue symmetrically, including null handling and DateTimeImmutable?
  4. Is there any test coverage for DST boundaries, non-UTC server session timezones, and round-trip fidelity?
  5. Who, if anyone, owns this repository today, and is a fork acceptable under our policy?

Integration Approach

Stack fit

  • Symfony 3/4-era bundle. Does not fit Laravel's package contract. Treat as source material, not a Composer dependency.
  • The underlying need — normalize persisted timestamps to UTC — is legitimate and common in Laravel applications, especially those using Doctrine or raw DATETIME columns across multiple regions.

Migration path

  1. Audit — read composer.json and the type class to confirm constraints and behavior.
  2. Extract — vendor the UTCDateTimeType class into app/Doctrine/Types/ (or equivalent), preserving the MIT attribution.
  3. Reimplement if needed — if the class is DBAL 2-only, rewrite against the DBAL version in use; the logic is small enough to own outright.
  4. Register — wire it through the application's Doctrine configuration (or a CastsAttributes cast if the app is Eloquent-based and the goal is simply consistent UTC handling).
  5. Drop the dependency — remove elcweb/common-bundle from composer.json once the class is internal.

Compatibility

  • Verify PHP constraint against the app's runtime (8.1/8.2/8.3).
  • Verify DBAL constraint; assume 2.x until proven otherwise, and plan for a rewrite if the app is on DBAL 3+.
  • Confirm behavior with DateTimeImmutable and nullable columns, not just mutable DateTime.
  • For Eloquent-only applications, a custom cast or an Attribute mutator is a better fit than a DBAL type; the package offers nothing for that path.

Sequencing

  • Week 1: constraint audit and a throwaway spike proving round-trip behavior in a branch.
  • Week 2: decide copy-in vs. rewrite; implement with tests.
  • Week 3: codify as an internal convention (UTC-on-write, convert at the presentation boundary) and document it, rather than standardizing on a package.
  • Do not block any roadmap item on this package; it is a hygiene decision, not a feature enabler.

Operational Impact

Maintenance

  • Effectively unmaintained. There is no release cadence, no visible issue triage, and no upgrade path for future DBAL/PHP versions. Any adoption transfers full maintenance burden to our team.
  • A fork is the only sustainable option, which raises the question of why not simply own the ~30 lines directly.

Support

  • No vendor, no community (0 stars, 0 dependents means essentially zero field usage to learn from). Incident support would be entirely internal.
  • Documentation is a single README section covering the UTC type only; the "common tools/libs" description is not substantiated.

Scaling

  • Runtime cost is negligible — one conversion per read/write of an affected column. No throughput, memory, or connection-pool implications.
  • Operational scaling concern is organizational, not technical: each additional service or team that adopts the bundle inherits an unmaintained dependency.

Failure modes

  • Silent timezone drift — the primary risk. Incorrect or asymmetric conversion persists wrong values without raising errors; corruption is discovered later, often during reporting or billing reconciliation.
  • DST edge cases — conversions near transitions can produce off-by-one-hour values if the type assumes a fixed offset rather than a timezone.
  • Server session timezone coupling — if the DB session is not UTC, results depend on environment configuration, producing dev/prod divergence.
  • Class-not-found / type-not-registered — in Laravel, absent bundle registration, the DBAL type never loads and columns silently fall back to default behavior.
  • Composer constraint failure — install-time breakage on modern PHP/DBAL, which is at least loud and therefore the least dangerous failure.

Ramp-up

  • Technical ramp-up is trivial: one small class, understandable in under an hour.
  • The real ramp-up is conceptual — ensuring the team understands where UTC normalization belongs (persistence vs. presentation), how the DB session timezone is set, and how to test it. That guidance must be authored internally because the package does not provide it.
  • Recommendation: do not adopt as a dependency. Copy or reimplement the UTC type under our own ownership, and record the pattern as an internal standard.
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.
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings