mrgoodbytes8667/date-bundle
mrgoodbytes8667/date-bundle is a PHP package that bundles date-related functionality for Laravel/PHP projects. It provides a Composer-installable date bundle for keeping date handling in a dedicated package rather than scattered across application code.
Install and inspect before adopting.
composer require mrgoodbytes8667/date-bundle
With Symfony Flex the bundle should be auto-registered; otherwise add it to config/bundles.php:
return [
// ...
MrGoodbytes8667\DateBundle\DateBundle::class => ['all' => true],
];
Look in this order:
README.md in the repo for the intended public API and any Twig/DI examples.src/ for the service classes and any DependencyInjection/ extension that exposes configuration (config/packages/date_bundle.yaml).src/Twig/ if you need date formatting in templates.composer.json for the supported PHP/Symfony version range before committing to it.tests/ (if present) — the fastest way to learn expected behavior.First use case — a formatting/relative-date helper. The common pattern for a "date bundle" is a service you inject where you currently call new \DateTime() or format():
public function __construct(private DateService $dates) {}
and/or a Twig filter used as {{ someDate|date_human }}. Confirm the exact names from source — with 0 stars and no declared license, do not assume the API is stable or documented.
->format('Y-m-d') across the codebase.BETWEEN clauses and to avoid off-by-one bugs when iterating days/weeks.date_bundle.yaml rather than passing timezones ad hoc.ClockMock or Carbon's setTestNow if the bundle relies on it) so relative-date output is deterministic. Add a thin adapter over the bundle's service so your tests don't depend on an unmaintained library's internals.composer.json and read the diff before upgrading (last release 2025-01-16).composer.json requirements against your app. A small bundle may not yet support the latest Symfony/PHP versions; a failed composer require is usually a constraint mismatch.config/bundles.php and run bin/console debug:container <service> to confirm services are wired.date.timezone in php.ini or the bundle config and confirm with a quick dump($service->now()) rather than guessing.\DateTimeImmutable/Carbon, consider using those directly. Adopting a thin, lightly maintained bundle adds a dependency and an upgrade risk for marginal benefit — measure whether it truly saves code.debug:container --tag=twig.extension to find its Twig extension, and debug:config date_bundle (if a config tree exists) to see available options. If behavior is surprising, read the source — at this size, the entire bundle is likely a short read.How can I help you explore Laravel packages today?