- How do I install fisharebest/ext-calendar in a Laravel application?
- Run composer require fisharebest/ext-calendar and let Composer autoload the package. It is a plain PHP library with namespaced classes, so no Laravel service provider, config file, or migration is required. Wrap the classes in your own service or adapter before calling them from controllers and models.
- Does fisharebest/ext-calendar replace PHP's ext/calendar on PHP 8?
- Yes, it is intended as a pure-PHP alternative to the ext/calendar extension, which is not available on PHP 8 by default. It provides cal_* style functionality and Julian day conversions for several calendars. Treat it as a narrow polyfill, not a full date and time abstraction.
- Which calendars does fisharebest/ext-calendar support?
- The package covers Gregorian, Julian, Jewish, French Republican, Arabic/Hijri, and Persian/Jalali calendars according to its description. Support means conversion and calendar metadata, not timezone-aware date handling. Verify the exact variant you need, such as Umm al-Qura Hijri or arithmetic Jalali, with fixtures.
- Is fisharebest/ext-calendar compatible with Laravel 8 and later?
- It has no Illuminate dependencies and is installed via Composer, so it can be used in Laravel 8+ applications running PHP 8.0+. The integration surface is just the package classes, which you should hide behind an application-owned interface. Check the package's declared PHP constraint during your integration spike.
- Can I use fisharebest/ext-calendar for Hijri or Jalali date conversion in production?
- It can handle Hijri and Jalali conversions, but calendar correctness is subtle. Hijri variants and Jalali arithmetic versus astronomical rules can produce different dates, so validate against published tables or ICU output. Use fixture-based tests before relying on it for user-facing dates.
- Is fisharebest/ext-calendar actively maintained and safe to depend on?
- The project has low visible community adoption and appears to be a single-maintainer library, so bus factor and long-term maintenance are real concerns. The code is small and forkable, but you should review release activity and PHP version support before adopting it. Pin the version and keep an internal fork or replacement path in mind.
- What are the licensing risks of using fisharebest/ext-calendar in a Laravel app?
- The package is GPL-3.0, which is copyleft and can trigger source-disclosure obligations if you distribute a proprietary application or container image containing it. SaaS use is generally lower risk but still requires legal review. If legal cannot approve GPL-3.0, consider ICU/intl or another permissively licensed alternative.
- Does fisharebest/ext-calendar replace Carbon for dates and timezones?
- No. It is a calendar conversion and Julian day library, not a date abstraction layer. Continue using Carbon or DateTimeImmutable for Gregorian dates, timezones, and formatting. Delegate only non-Gregorian conversion and month metadata to this package.
- How should I store converted Hijri or Persian dates in a Laravel database?
- Store the canonical date as Gregorian/UTC, plus a calendar identifier and the original user-entered string. Do not store only the converted calendar value, because conversion rules and variants can change. This also makes validation and display decisions easier to audit.
- How do I test fisharebest/ext-calendar conversions in Laravel?
- Use fixture-based tests with known-good conversion tables or ICU output, including leap-year boundaries, historical Julian/Gregorian cutover, and negative years. Run dual-comparison tests against the PECL extension in an isolated sandbox if available. Also test how your adapter surfaces invalid dates, either as exceptions or validation errors.