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

Time Ago Bundle Laravel Package

eschmar/time-ago-bundle

TimeAgoBundle provides a simple Twig filter for Symfony that expresses time differences in words, returning actual dates beyond ±7 days. Supports many languages, configurable date format, and future times. Install via Composer; works with Symfony 2.8–5.x.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

  • Architecture fit — poor for the stated target. This is a Symfony bundle, not a Laravel package. Its integration unit is a bundle registration (EschmarTimeAgoBundle in AppKernel pre-4, auto-discovery on 4+/5+) plus a Twig extension. Laravel has no bundle kernel and, by default, no Twig — the view layer is Blade. You cannot composer require this into a Laravel app and get a working filter. Only the underlying capability (relative-time formatting + translation strings) transfers, and that capability is a few dozen lines of date arithmetic.
  • What it actually does. A single |ago Twig filter renders a time difference in words within a ±7-day window; beyond that it falls back to a formatted date (Y-m-d H:i:s by default, configurable via eschmar_time_ago.format). Handles both directions ("3 minutes ago", "in 4 hours"). Ships 26 locale translation catalogs.
  • Integration feasibility. Low in Symfony (composer require, enable bundle, optional YAML config). Moderate in Laravel (needs a Twig bridge or a port into a Blade directive / formatter service). Given Laravel already ships Carbon, diffForHumans() covers most of the same surface with zero added dependency surface.
  • Technical risk.
    • Maintenance: Last release 2022-03-04. Latest major v2.0.0 targets Symfony ^5.0 only — no v3, no Symfony 6/7. That is a hard blocker even on the Symfony path and a signal for any path.
    • Adoption: 17 stars, 0 dependents, single maintainer. Effectively unvetted; no downstream evidence of behavior in production.
    • Quality signal: Maturity flags list only readme, releases — no CI, no advertised test suite, no coverage. Consistent with the 5.885 score.
    • Behavior: The ±7-day cutoff is a hard-coded product decision. Beyond a week users see a raw PHP date() pattern — unlocalized, and visually inconsistent next to relative strings in the same list.
    • i18n: 26 locales exist but there is no documented fallback contract, pluralization strategy, or edge-case handling ("1 minutes ago"). Catalog upkeep depends entirely on the maintainer.
    • License: MIT — no legal exposure; vendoring with attribution is clean.
  • Key questions.
    1. Is the real target Laravel or a Symfony service? The recommendation inverts depending on the answer.
    2. What is our framework/PHP baseline? Carbon's diffForHumans() already solves this for Laravel — why add a dependency?
    3. Do we need these exact 26 locales, or is our supported set smaller?
    4. Is "relative within 7 days, absolute timestamp after" an acceptable product rule, or do we need "3 months ago" (which this deliberately does not provide)?
    5. If we vendor it, who owns the fork, and what is our contingency given upstream is already quiet?

Integration Approach

  • Stack fit. Poor as a direct Laravel dependency. Fair-to-good for Symfony ≤5. Conceptually it is a thin presentation concern with no DB, queue, or service coupling — which is precisely why the capability is cheap to own even though the package is a poor fit.
  • Recommended path (Laravel): do not add the package. Implement a time_ago Blade directive or a small TimeAgoFormatter service around Carbon:
    • Carbon::parse($value)->locale($appLocale)->diffForHumans() for relative output;
    • branch on abs(now()->diffInDays($value)) <= 7, else ->format($configFormat);
    • cover future/past and both branches with unit tests. This reproduces the package's contract — relative inside a week, absolute outside, direction-aware — with no new dependency and full test ownership.
  • Alternative path (vendor/port). If the 26-locale string catalog is the actual value, copy the translation resources under MIT with attribution and wire them into lang/. Keeps the asset, drops the abandonment risk. Attribution is the only obligation.
  • Acceptable path (Symfony target only). composer require eschmar/time-ago-bundle ^2.0.0, confirm auto-registration on the actual Symfony minor, add eschmar_time_ago.format to config, smoke-test both the relative and the absolute branch.
  • Migration path / compatibility. Pin major to Symfony minor: v2 → 5.x, v1.1 → 4.x, v0.5 → 3.4, v0.4 → 2.8. There is no release for Symfony 6/7, so any framework upgrade becomes a forced fork. Plan that fork at adoption time, not at upgrade time.
  • Sequencing.
    1. Confirm target framework and PHP baseline — this gates everything.
    2. Spike the four README cases plus boundaries: 6d 23h, exactly 7d, 7d 1h, "now", future dates, DST transitions.
    3. Diff package output against Carbon diffForHumans() per locale; that delta is the true cost of adopt-vs-build.
    4. Decide: reimplement in-app (preferred for Laravel) → vendor strings (if locale coverage wins) → direct dependency (Symfony-only, short horizon).
    5. If depending, pin the version, record the fork contingency, and add a re-evaluation checkpoint to every framework upgrade ticket.

Operational Impact

  • Maintenance. Volunteer-only and dormant since early 2022, with no advertised CI or tests. The code is genuinely simple, but "stable" ≠ "unmaintained": framework upgrades will break bundle registration and Twig extension signatures long before they break the date logic.
  • Support. No vendor, no SLA, one maintainer, zero dependents — no community pressure to fix issues and no peer experience to lean on. Internal ownership lands on whichever team adds it, which is the same team that could simply write the equivalent in a day.
  • Scaling. Runtime cost is a date parse plus a catalog lookup — negligible. The real scaling concern is UX consistency: the ±7-day cliff means list views will mix "5 days ago" with "2023-04-11 14:32:07" unless the fallback format is deliberately chosen and localized. At high row counts an unlocalized date() pattern reads as a bug in every non-English locale.
  • Failure modes to plan for.
    • Framework upgrade breaks bundle auto-registration or the Twig extension API — most likely failure.
    • Symfony 6/7 has no supported release at all — hard blocker, no workaround short of a fork.
    • Requested locale absent from the catalog → falls back to English or a raw key depending on translator config; test each supported locale explicitly.
    • Pluralization/edge phrasing in less-reviewed locales ("1 minutes ago").
    • Timezone drift between stored timestamps and date('now')-style inputs producing off-by-hours relative strings.
    • Boundary behavior at exactly 7 days and across DST transitions.
    • Config drift: eschmar_time_ago.format set per environment, so staging and production render differently.
  • Ramp-up. Trivial. One filter, one config key, complete README — a mid-level engineer can evaluate, port, or replace it in under a day. The cost isn't learning the package; it's owning a dependency nobody else depends on.
  • TPM recommendation. Treat this as a reference implementation, not a dependency. The reusable assets are the 26 translation catalogs and the ±7-day product rule; the liabilities are the Symfony-only packaging, the 2022 release date, and zero ecosystem adoption. In a Laravel context, Carbon diffForHumans() plus a short formatter service delivers the same user-facing behavior at a fraction of the operational risk. Low stars, zero dependents, low opportunity score (18.94), and a stale cadence all point the same way.
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.
takashato/laravel-vietqr
aitor24/laralang
kraenzle-ritter/entity-relations
dindigital/din-image
pomirleanu/image-colors
sawmainek/laravel-api-generator
delatbabel/jsonresponses
mouhamedfd/permissions-generator
eduplus/qr
laravel2580/idehelpers
delatbabel/viewpages
anavel/gettext
muhamadrezaar/highcharts
delatbabel/keylists
frankkessler/salesforce-laravel-oauth2-rest
anavel/foundation
wdmtech/enviricons
eii/laravel-captcha
muka/shape-reader
tdt/json