chaplean/business-days-bundle
AppKernel.php (deprecated in Laravel 5.5+), requiring a modern adaptation (e.g., service provider registration).BusinessDays service can be reused via Laravel’s service container without full bundle integration.register() in a custom service provider).AppKernel).spatie/calendar, carbon/carbon)?DependencyInjection)? If yes, integration is easier.BusinessDays service can be injected into Laravel controllers/services via the container, bypassing the bundle entirely.strict_types=1 support.create_function).Option A: Bundle Integration (High Risk)
AppKernel.php with a Laravel service provider (e.g., ChapleanBusinessDaysServiceProvider).config.yml with Laravel’s config/business_days.php.Option B: Standalone Service (Recommended)
BusinessDays class and register it as a Laravel service:
// app/Providers/AppServiceProvider.php
public function register()
{
$this->app->singleton('businessDays', function () {
return new \Chaplean\BusinessDays\BusinessDays();
});
}
Option C: Fork & Modernize
composer.json adjustments).AppKernel with a service provider.replace in composer.json to avoid version conflicts.spatie/calendar) in 6–12 months.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| PHP version incompatibility | Integration breaks | Use polyfills or fork the package. |
| Holiday calculation errors | Incorrect deadlines/invoicing | Add validation tests; use fallback logic. |
| Bundle config issues | Service not registered | Manual service binding in Laravel. |
| No future updates | Security/feature gaps | Plan replacement with spatie/calendar. |
How can I help you explore Laravel packages today?