Enhance iCalendar export and subscription functionality#1545
Open
lucs7 wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modernizes LibreBooking’s iCalendar (ICS) export/subscription pipeline by switching serialization from a Smarty template to Sabre\VObject, and adds support for naming exported/subscribed calendars (e.g., schedule/resource/group name or localized “My Calendar”).
Changes:
- Replace hand-built ICS template rendering with Sabre\VObject-based VCALENDAR/VEVENT/VAlarm generation.
- Add calendar naming support to subscription/export flow (including resource group name support).
- Update PHPUnit tests and PHPStan config to accommodate Sabre’s magic property access and new serialization expectations.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tpl/Export/ical.tpl | Removes the legacy Smarty ICS template now replaced by Sabre serialization. |
| Pages/Export/CalendarExportDisplay.php | Implements Sabre\VObject calendar/event/alarm generation and serialization; supports optional calendar name. |
| Pages/Export/CalendarSubscriptionPage.php | Passes calendar name into the export display renderer. |
| Pages/Export/SubscriptionPage.php | Stores calendar name on subscription pages and exposes setter. |
| Pages/Export/ICalendarSubscriptionPage.php | Extends subscription page interface with calendar name setter. |
| Presenters/CalendarSubscriptionPresenter.php | Determines calendar name (schedule/resource/group/user) and sets it on the page. |
| lib/Application/Schedule/CalendarSubscriptionService.php | Adds resource-group-name lookup support. |
| lib/Application/Schedule/iCalendarReservationView.php | Stops pre-escaping RFC5545 TEXT values; relies on Sabre serialization to escape. |
| tests/Presenters/CalendarExportPresenterTest.php | Updates expectations for raw view values and adds assertions for serialized escaping. |
| tests/Presenters/CalendarSubscriptionPresenterTest.php | Adds assertions that calendar names are set for schedule/resource/user/group subscription flows. |
| tests/Application/Schedule/CalendarSubscriptionServiceTest.php | Adds coverage for resource group name lookup behavior. |
| phpstan.neon | Configures Sabre Node as a universal object crate to avoid false positives on magic ICS properties. |
| phpstan_next.neon | Same PHPStan adjustment for the “next” ruleset. |
removes template file for ical
…simplify text formatting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request implements several improvements to iCalendar (ICS) export and subscription functionality. It implements the use of sabre to create the ics feeds and adds calendar naming capabilities.