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.
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:
Intl satisfy it with better tree-shaking and active maintenance?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:
npm install moment (or a maintained alternative), pin an exact version at or above the last patched release.resources/js/app.js) and let Vite bundle it.resources/ or node_modules and delete the bundle dependency — a one-commit change, not a migration program.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.
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:
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.
How can I help you explore Laravel packages today?