johngrogg/ics-parser
A PHP library for parsing iCalendar (.ics) files into associative arrays of calendars and events, with DateTime support, time zone handling, and resolved property arrays. Install via Composer as johngrogg/ics-parser.
VTIMEZONE blocks, DST transitions, RECURRENCE-ID overrides, and vendor-specific malformed output. Adopting this package converts a multi-sprint parsing project into a Composer dependency, freeing roadmap capacity for the product surface (mapping, dedupe, UI, alerts)..ics file/URL. That makes it the right tool for a Phase 1 inbound-only roadmap: "import and display" ships now, while full CalDAV/OAuth two-way sync stays a separate, larger bet. It gives you a credible v1 without pre-committing to the harder architecture.CalendarImportService wrapper (validation, UID+SEQUENCE dedupe, timezone normalization, storage schema, retry/observability) rather than assuming the package is a drop-in feature.Adopt when:
.ics/.ical/.ifb and never need to generate calendar files.Look elsewhere or plan mitigations when:
eluceo/ical) alongside it.BYSETPOS/BYYEARDAY, long-horizon recurrence) at scale. Validate against your real feeds before committing; recurrence edge cases are the single most likely source of production bugs here.sabre/vobject, which is the more battle-tested, actively maintained iCalendar library and part of the SabreDAV ecosystem. For a revenue-critical sync path, that comparison is worth half a day.To executives: We need calendar ingestion for [channel sync / availability / event feeds], and roughly 80% of that work is unglamorous format parsing, not product. A mature MIT-licensed PHP library covers that layer for free, letting us ship an inbound calendar feature in this quarter instead of next, with no per-seat SaaS sync fees and no vendor contract. It's read-only by design, so it's the safe, reversible half of the calendar roadmap — if two-way sync ever justifies its cost, we've already de-risked the data layer.
To engineering: Composer-installable (johngrogg/ics-parser, ^3, note owner is johngrogg not u01jmg3), PHP 8+ with a 5.6/7.4 path, MIT, no runtime dependencies or services. It returns associative arrays per event — no models, no service provider, no queue hooks, so we own the integration: a CalendarFeedParser interface, a queued import job, a schema keyed on UID + SEQUENCE with RECURRENCE-ID override handling, explicit timezone normalization, and fixture tests built from real vendor feeds. Isolate it behind our own interface from day one — that keeps sabre/vobject or a future in-house parser as a drop-in swap and caps our exposure to a low-star, single-maintainer dependency.
Known risks to flag now: timezone handling (feed-provided VTIMEZONE vs. PHP tzdata vs. Windows zone names), recurrence expansion correctness, malformed third-party input, and a thin maintainer bench. Mitigation is cheap: real-feed test fixtures, a parse-failure alerting path, pinning the major version, and the wrapper abstraction.
How can I help you explore Laravel packages today?