- Is lightsuner/carbon-bundle a Laravel package?
- No. It is a Symfony 2 bundle, which is a Symfony-specific distribution artifact built on Symfony\Component\HttpKernel\Bundle\Bundle, AppKernel registration, and DependencyInjection extension conventions. Laravel has no bundle system, no AppKernel, and no equivalent DI extension layer, so the package has no supported path into a Laravel application.
- Can I install carbon-bundle in a Laravel app with Composer?
- You can add it to composer.json, but nothing will register or run. There is no Laravel service provider, no auto-discovery entry Laravel recognizes, and no facade or container binding. You would also likely hit PHP version constraints from its 2018-era release that conflict with PHP 8.2 and modern Laravel.
- What is the difference between a Symfony bundle and a Laravel package?
- A Symfony bundle plugs into the Symfony kernel through Bundle classes, AppKernel registration, and DependencyInjection extension files. A Laravel package ships service providers, facades, config publishing, and auto-discovery via composer extra. They are different delivery mechanisms for different frameworks, and one does not load the other.
- Does Laravel already include Carbon?
- Yes. Laravel pulls nesbot/carbon transitively through illuminate/support and exposes it as Illuminate\Support\Carbon. You get now(), Carbon::parse(), Eloquent date casts, diffForHumans(), and timezone handling from config/app.php without adding any package. That covers essentially everything Carbon Bundle advertises.
- Which Laravel and PHP versions does carbon-bundle support?
- None officially. The last tagged release was 2018-11-30 and it targets Symfony 2, which reached end of life in 2018/2019. It assumes PHP 5.6/7.0-era constraints, so expect Composer conflicts on PHP 8.2+ and on Laravel 9, 10, and 11.
- What are the best Laravel alternatives to carbon-bundle for date formatting?
- Use native Carbon: diffForHumans() for relative time, toIso8601String() or isoFormat() for ISO output, and translatedFormat() for localized strings after Carbon::setLocale(). In Eloquent, date casts and accessors keep formatting out of your views. If you want custom one-liners, register them once with Carbon::macro() in a service provider.
- Is lightsuner/carbon-bundle safe to use in production?
- No. It is an end-of-life Symfony 2 artifact with no security patches, a release roughly seven years old, zero downstream dependents, and a single low-signal maintainer. Adding an unmaintained dependency to satisfy a need Laravel already meets is a net negative in any architecture or supply-chain review.
- How do I freeze time in Laravel tests without Carbon Bundle?
- Use Carbon::setTestNow() in your setUp method and clear it in tearDown. Laravel's test helpers also provide travel(), travelTo(), and freezeTime() for the same purpose. No bundle or extra package is required.
- How do I set locale and timezone for Carbon dates in Laravel?
- Set timezone and locale in config/app.php, then call Carbon::setLocale() when you need a per-request locale. Carbon's translatedFormat() and diffForHumans() will honor the locale you set. Carbon Bundle's own locale and timezone config simply duplicates these existing Laravel keys.
- Is lightsuner/carbon-bundle still maintained?
- No. The last release was tagged on 2018-11-30, the project has around 15 stars, and it has no downstream dependents providing validation or bug reports. Treat it as unmaintained and do not adopt it for new Laravel work.