morilog/jalali
morilog/jalali provides a fast, human-friendly Jalali (Persian) calendar API for PHP/Laravel. Convert and format dates, manipulate and compare date/times via the immutable Jalalian class, with helpers like jdate(), Carbon support, and “ago” relative output.
morilog/jalali v3.5.0 is still a lightweight utility for Jalali date/time handling, ideal for Laravel apps targeting Persian-speaking regions. No architectural conflicts introduced.DateTimeZone parameters) align better with PHP 8.1+ strict typing, reducing potential runtime warnings.TypeError in strict PHP environments, making integration smoother in Laravel’s typed contexts (e.g., dependency injection, method signatures).Carbon macro integrations remain valid. The package still mirrors Carbon’s API where possible.DateTimeZone-related edge cases (e.g., null timezones, invalid offsets)?Carbon::macro() to alias Jalali methods (unchanged). The nullable fixes may simplify type hints in custom macros.TypeError in custom casting logic.@jalali) remain unaffected.DateTimeZone $tz without ?) that may now fail in PHP 8.1+.phpstan or psalm to detect potential issues.| Priority | Task | Dependencies |
|---|---|---|
| P0 | Type Safety Audit | None |
| P0 | Validate core functionality (parse/format) | P0 |
| P1 | Integrate with Blade (UI layer) | P0 |
| P2 | Add Carbon macros (with strict typing) | P1 |
| P3 | Implement Eloquent casting | P2 |
| P4 | Database hybrid storage (if needed) | P3 |
@param DateTimeZone|null $tz).TypeError in logs post-upgrade.Argument 1 passed to Jalali::parse() must be null|string).| Risk | Mitigation |
|---|---|
| TypeErrors in Strict PHP | Audit codebase pre-upgrade; use phpstan to catch issues early. |
| Incorrect Conversions | Unchanged—add pre-commit hooks for conversion tests. |
| Timezone Mismatches | Unchanged—enforce explicit timezone handling. |
| Database Inconsistencies | Unchanged—use triggers/validation. |
Jalali::parse(string|null $date)).null inputs in DateTimeZone parameters.null timezone).How can I help you explore Laravel packages today?