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

Moment Js Bundle Laravel Package

stinger/moment-js-bundle

A Laravel bundle that packages Moment.js for easy asset publishing and Blade-ready usage. It simplifies including the library in your views without relying on external CDNs, with configurable paths for a cleaner, self-hosted frontend setup.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: stinger/moment-js-bundle is a Symfony2 bundle, not a Laravel package. It exists solely to register Moment.js as an asset within Symfony's Assetic/Twig asset pipeline via a bundle class and DI extension. It has no Laravel service provider, no facade, no config publishing, and no Composer autoload contract aligned to Laravel's package discovery. Treating it as a Laravel/PHP package is a category error: the integration layer it targets (Symfony Bundle registration, Assetic filters, {% javascripts %} tags) does not exist in a Laravel application. The only portable payload is the bundled Moment.js asset itself, which is a static JS file obtainable directly from npm/CDN.

Integration feasibility: Effectively zero for the intended Symfony2 use case in a modern stack, and negative value for Laravel. Symfony2 reached end-of-life in 2018; Assetic is abandoned; bundles of this shape are incompatible with Symfony Flex (Symfony 3.4+/4+) which expects recipes rather than bundle registration. Laravel's Vite/Mix asset pipelines have no relationship to this bundle. A TPM should classify this as "do not integrate" and, if Moment.js is required, source it from npm and manage it through the project's own bundler.

Technical risk: High if adopted. Risks include: an unmaintained asset from 2015 whose pinned Moment.js version will carry known CVEs (notably ReDoS advisories in Moment versions prior to 2.29.4); abandoned transitive dependencies via Assetic; no security disclosure channel (0 stars, 0 dependents, single maintainer, dormant since 2015-07-01); and the reputational/supply-chain risk of pulling an obscure, unvetted package into a build. The MIT license is permissive, which is the one favorable factor, but license clarity does not mitigate abandonment.

Key questions:

  • Is the actual requirement "we need Moment.js" or "we need Symfony2-era asset bundling"? The former is solvable in minutes; the latter is a legacy-platform decision, not a package decision.
  • What is the current framework and PHP version? If Laravel 9+ or Symfony 5+, this package is structurally inapplicable.
  • Does the requirement demand Moment.js specifically, or would date-fns/Day.js/Luxon/Intl satisfy it with better tree-shaking and active maintenance?
  • Who owns the legacy system that would consume a Symfony2 bundle, and what is its decommission timeline?

Integration Approach

Stack fit: Poor to non-existent. The bundle assumes Symfony 2.x kernel bundle registration, Resources/config/services.yml conventions, and Assetic-based asset compilation. A Laravel stack assumes service providers, config/app.php or package discovery, and Vite/Mix. There is no shared surface. The correct framing for a TPM is that this package is not a candidate for integration; the underlying capability (Moment.js) is.

Migration path: If the genuine goal is to add Moment.js to a Laravel app, skip the package entirely:

  1. npm install moment (or a maintained alternative), pin an exact version at or above the last patched release.
  2. Import in the relevant entry point (e.g. resources/js/app.js) and let Vite bundle it.
  3. If Moment.js is already vendored via this bundle in a legacy Symfony app, extract the JS asset once into the project's own resources/ or node_modules and delete the bundle dependency — a one-commit change, not a migration program.
  4. Replace Assetic-based inclusion with the target framework's native asset pipeline; validate locale loading separately, since this is where Moment.js usage often breaks.

Compatibility: No compatibility with Laravel 5.x through 11.x, no compatibility with Symfony 3.4+ under Flex, no PHP 7.2+/8.x guarantees, and no evidence of testing against any modern runtime. Moment.js itself is in maintenance mode upstream (feature-frozen since 2020), so even the healthy path carries a long-term modernization debt.

Sequencing: (1) Confirm the requirement is the JS library, not the bundle. (2) Reject the package in favor of direct npm management. (3) If a legacy consumer exists, inventory where the bundle is referenced, replace with a direct asset reference, and remove the dependency in the same change window. (4) Add a follow-on backlog item to evaluate migrating off Moment.js to Intl/Day.js to reduce bundle size and eliminate maintenance-mode dependency.

Operational Impact

Maintenance: None available. Last release 2015-07-01, zero stars, zero dependents, no release cadence, no evident CI, and no maintainer activity for roughly a decade. Any defect discovered becomes your team's code to own. This is functionally an unsupported vendored asset.

Support: No community, no issue triage, no security advisory process. Internal support burden falls entirely on the adopting team; a TPM should budget for treating this as first-party code from day one.

Scaling: The package itself does not scale concerns — it ships static JS. Scaling risk is indirect: Moment.js is large and not tree-shakeable, so bundling it wholesale inflates front-end payloads and can affect Core Web Vitals at scale. Locale inclusion multiplies size if not curated.

Failure modes:

  • Security: unpatched Moment.js version with known ReDoS advisories; no path to a fix except self-patching.
  • Build: Assetic abandonment means the asset pipeline may fail on modern Node/PHP toolchains.
  • Supply chain: a dormant, low-visibility package is a poor trust posture for a dependency; consider excluding it via policy rather than reviewing it per-project.
  • Silent staleness: teams may believe they are "using Moment.js safely" while pinned to a 2015 snapshot.

Ramp-up: Minimal to learn, because there is nothing to learn — the integration surface is one asset include. The real ramp-up cost is the unlearning: persuading stakeholders that the correct action is to not adopt the package and instead take the two-line npm route. Estimate well under a day of engineering for the replacement path; the effort is governance and communication, not implementation.

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.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin