Release Notes: v2.0
Breaking Changes
- PHP 8.3+ required — minimum PHP version bumped from 8.1 to 8.3
$fromand$toare nowDateTimeImmutable— previouslyDateTime- Link properties are now public readonly —
$title,$from,$to, and$allDayare public readonly;$descriptionand$addressare public. The magic __get() method has been removed. Link::create()no longer accepts $allDay parameter — use Link::createAllDay() for all-day events insteadLink::createAllDay()end date semantics changed — the $numberOfDays parameter now represents inclusive days (e.g.,createAllDay('Event', $date, 1)creates a single-day event). The constructor now internally adds +1
day to convert to the exclusive end date expected by calendar services.- Link constructor is now final — subclassing the constructor is no longer possible; use static factory methods
InvalidLink::invalidDateRange()removed — the deprecated method has been deleted; use InvalidLink::negativeDateRange() insteadBaseOutlook::baseUrl()visibility changed — from public to protectedWebOfficeandWebOutlookclasses are now final- Generator constants are now typed — e.g., const string FORMAT_HTML = 'html' (PHP 8.3 typed constants)
- Instance properties replaced with class constants —
$dateFormat,$dateTimeFormatin Google, Yahoo, and BaseOutlook are now private const values, preventing override via subclassing
New Features
- Custom ICS
PRODID— the Ics generator now accepts a PRODID option to customize the product identifier in generated ICS content Link::createAllDay()returns static — previously returned self, now supports late static binding for subclasses
Bug Fixes
- All-day events off by one day — fixed all-day events created via the constructor being 1 day short
- ICS DTSTAMP RFC 5545 compliance — DTSTAMP now always uses UTC datetime for all-day events (previously used date-only format)
- ICS DTSTART for all-day events — added VALUE=DATE parameter to DTSTART for all-day events per RFC 5545
- ICS escape string RFC 5545 compliance — escapeString() now properly handles backslashes, semicolons, commas, and newlines per RFC 5545 section 3.3.11 (previously used addcslashes which was non-compliant)
- ICS VALARM trigger fix — fixed reminder/alert not working when a specific date was set as the trigger time
Internal / Code Quality
declare(strict_types=1)added to all source files- Modern PHP 8.3+ features: typed class constants,
#[\Override]attributes DateTimeImmutableused throughout instead of mutableDateTime- PHPUnit
#[Test]attributes replace@testannotations - PSR-12 coding style applied
- Psalm upgraded to v6.15 with improved type annotations (@api, non-empty-string, non-empty-list)
- Removed unnecessary clone calls thanks to immutable date objects
Made by @alies-dev and the community.
Full Changelog: 1.11.1...2.0