maherelgamil/arabicdatetime
A Laravel package for Arabic date and time formatting, converting Carbon dates into readable Arabic output with localization support for names of months, days, and time expressions in your applications.
Architecture fit. This is a presentation-layer utility, not infrastructure. It sits at the very edge of the stack — formatting a Carbon instance into an Arabic-labelled, optionally Hijri, string. That is architecturally favourable for us: the blast radius of a defect or an abandoned dependency is confined to rendered output, not to persistence, auth, or business transactions. It is a Laravel-native package (service provider + facade, likely auto-discovered, likely with a publishable config), so it slots into the framework's conventions without ceremony. The caveat is that "fits the framework" is not the same as "fits our application" — if we ever need this in a non-Laravel worker, a CLI tool, or a queue consumer outside the framework container, a facade-bound formatter becomes friction.
Integration feasibility. Mechanically trivial: composer require, publish config, call the facade or Blade directive. The real feasibility question is dependency-graph compatibility, not API design. Last release 2021-06-22 means the illuminate/support and nesbot/carbon constraints were authored against the Laravel 8 / Carbon 2 era. Modern Laravel (10/11) and PHP 8.1+ may resolve only via --ignore-platform-reqs or a fork. Before committing, run composer why-not maherelgamil/arabicdatetime <version> against our actual lockfile to see the concrete conflict, not the theoretical one.
Technical risk. Ranked:
setlocale can contaminate subsequent formatting in the same process — a real problem under Octane/Swoole and long-lived queue workers.Key questions for the maintainer/team.
setlocale, and does it restore prior state?Stack fit. Treat this as a replaceable rendering adapter, not a foundation. Wrap it behind our own interface (e.g. ArabicDateFormatter::format(CarbonImmutable $d, string $style)) and let the package be one implementation. This costs a day and buys us the ability to swap to a maintained library, a first-party implementation, or an ICU/intl-based formatter without touching call sites. Laravel's container makes this cheap; not doing it is the expensive choice.
Migration path.
illuminate/support is usually a one-line change, but only if the API surface used is actually stable across Laravel versions.Compatibility. Confirm three axes explicitly: Laravel version, PHP version, Carbon major version. Carbon 2 → 3 is the likeliest breakage point, and Laravel 11 straddles it. Also verify the package's Blade directive (if present) hasn't been affected by Blade compilation changes, and that the config file publish/merge still works with our config caching (php artisan config:cache) — stale config merges are a classic Laravel package upgrade trap.
Sequencing. Pin an exact version (not a caret range) at install. Fork only if the compatibility spike fails — don't fork preemptively. Gate the feature behind a config flag so rollout is reversible without a deploy of new logic. Sequence: spike → golden-date fixtures → adapter → state-hygiene test → internal surface → external surface.
Maintenance. Assume we own this. No releases since mid-2021 and a single maintainer means upstream is effectively dormant; the realistic steady state is a vendored fork under our namespace with a named internal owner. Ongoing cost is low but non-zero: periodic review when Laravel majors land, since that's when the constraint pins bite. Put it on the dependency-review list alongside other low-activity packages so it isn't rediscovered during an upgrade crunch.
Support. No commercial support, no SLA, small community — issues may go unanswered indefinitely. Internal support burden falls on whoever owns the adapter. Because the adapter boundary exists, "support" degrades gracefully: a broken package is a swap, not an incident.
Scaling. Runtime cost is negligible — string formatting on already-materialised dates. Do not call it inside tight loops over large collections if it re-parses per row; format once at the serialisation boundary. The genuine scaling concern is not CPU but state: long-lived workers and Octane processes reuse a global locale, so any package-level global mutation compounds over process lifetime. Test under concurrency, not just sequentially.
Failure modes to design for.
Ramp-up. Low for a competent Laravel developer — an afternoon to integrate, a day to do it properly with fixtures and the adapter. The non-obvious cost is domain literacy: the team needs enough grounding in Hijri calendar variants to know when a one-day discrepancy is a bug versus an expected sectarian/regional difference. If the Hijri date ever feeds a contract, invoice, payroll, or religious-timing feature, that domain review is mandatory and should be treated as a product decision, not an engineering one.
How can I help you explore Laravel packages today?