phil / calendar-bundle
Events with recurrence, venues and hosts in Symfony: occurrences expanded within a budget, month to poster views in a Live component, iCalendar, private feeds.
Package info
github.com/parler-haut-interagir-librement/calendar-bundle
Type:symfony-bundle
pkg:composer/phil/calendar-bundle
Requires
- php: >=8.5
- ext-intl: *
- ext-mbstring: *
- ext-sodium: *
- doctrine/dbal: ^4.5
- doctrine/orm: ^3.7
- phil/doctrine-behaviours: ^0.2@dev || ^0.3@dev
- phil/locale-dimensions: ^0.1@dev
- phil/recurrence: ^0.1@dev
- phil/recurrence-bundle: ^0.1@dev
- phil/url: ^0.1@dev
- psr/clock: ^1.0
- psr/log: ^3.0
- symfony/config: ^8.2
- symfony/dependency-injection: ^8.2
- symfony/event-dispatcher-contracts: ^3.6
- symfony/form: ^8.2
- symfony/http-foundation: ^8.2
- symfony/options-resolver: ^8.2
- symfony/translation-contracts: ^3.6
- symfony/uid: ^8.2
- symfony/validator: ^8.2
- symfony/workflow: ^8.2
Requires (Dev)
- doctrine/doctrine-bundle: ^3.3
- doctrine/persistence: ^4.1
- phil/almanac: ^0.1@dev
- phil/paged-media: ^0.1@dev
- phil/privacy-bundle: ^0.1@dev
- phil/resource: ^0.1@dev
- phil/structured-data: ^0.1@dev
- phil/taxonomy-bundle: ^0.2@dev
- phil/ux-kit: ^0.5@dev
- phpunit/phpunit: ^13.4
- symfony/asset-mapper: ^8.2
- symfony/clock: ^8.2
- symfony/console: ^8.2
- symfony/event-dispatcher: ^8.2
- symfony/framework-bundle: ^8.2
- symfony/http-kernel: ^8.2
- symfony/routing: ^8.2
- symfony/service-contracts: ^3.6
- symfony/stimulus-bundle: ^3.7
- symfony/translation: ^8.2
- symfony/twig-bridge: ^8.2
- symfony/twig-bundle: ^8.2
- symfony/ux-live-component: ^3.7
- symfony/ux-twig-component: ^3.7
- symfony/yaml: ^8.2
- twig/twig: ^3.21
Suggests
- phil/almanac: To show computed dates — holidays, phases of the Moon — among the events
- phil/paged-media: For the calendar printed, a month per page, in PDF
- phil/privacy-bundle: For a member's choices, feed, attendances and proposals in the export and the erasure of their data
- phil/structured-data-bundle: For calendar_event_json_ld adding the event to the one graph of the page
- phil/taxonomy-bundle: For tags shared with the rest of the site, renamed and merged in one place
- phil/ux-kit: For the Popover, Badge, Card, Button, ButtonGroup and Empty recipes the templates draw, and the tokens the stylesheet reads, through the Symfony UX Toolkit
- symfony/console: For phil:calendar:import-almanac and phil:calendar:refresh-tags
- symfony/stimulus-bundle: For the keyboard in the month's grid
- symfony/ux-live-component: For the calendar on a page, <twig:PhilCalendar:Calendar>, with symfony/ux-twig-component
- twig/twig: For calendar_occurrences and occurrence_when
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-11-21 03:05:45 UTC
README
Events, repeating or not, shown as a month, week, day, list or posters.
phil/calendar-bundle is a calendar for a Symfony application. Events live in Doctrine with their time zone, whole days,
a recurrence rule and the occurrences it takes away, hosts, tags, a venue and a poster. A venue is a place of its own or
a listing of the application's directory. The bundle gives the occurrences of a period in order, for one host or one
tag, an event form, and an iCalendar file at /calendar.ics that people subscribe to. Events and venues are translated
in the locales an application declares. Members attend an occurrence or a whole event, within its capacity; they propose
events that a moderator approves; each has a calendar of their own, made of what they attend, host and follow — hosts'
calendars, tags, venues, events — less what they hide, with a private iCalendar feed at a secret address they can
revoke. An occurrence can have a page of its own, where its tickets are sold, and the calendar prints a month per page.
Every list of occurrences of a request shares one budget, so that a calendar of many repeating rules holds a page to a
bounded time. Labels come in English and French.
It is for a site where organizers or editors schedule events and visitors browse them. The calendar on a page is the
PhilCalendar:Calendar Live Component, in five views: month, week, day, list and posters. The week and the day can
share their hours between hosts, venues or tags. When phil/almanac is installed, its dates show among the events.
When phil/taxonomy-bundle is installed, tags are shared with the rest of the site. Reach for phil/recurrence or
phil/recurrence-bundle alone when an application needs repeating rules without a whole calendar.
The bundle builds on phil/recurrence and phil/recurrence-bundle, Doctrine ORM and Symfony Form. Symfony UX Live
Component, Stimulus and Twig are optional. The views are laid out in PHP and know nothing of HTML: the component's
templates only draw what they compute, with the Popover, Badge, Card, Button, ButtonGroup and Empty recipes of the
PHIL UX kit, installed in the application by the Symfony UX Toolkit. Synchronizing with the calendars of members —
CalDAV, Google, Microsoft — is the work of phil/calendar-sync. The Calendar service sits on the EventRepository port,
with DoctrineEventRepository as its adapter.
Status
| Part | State |
|---|---|
Event, EventHost, Occurrence and the repository port |
Implemented and tested |
Calendar: schedule, change, remove, host, the occurrences of a period |
Implemented and tested |
Tags in phil/taxonomy-bundle: EventTagging, TaxonomyEventTagging, phil:calendar:refresh-tags |
Implemented and tested |
DoctrineEventRepository |
Implemented and tested |
EventType and EventDraft |
Implemented and tested |
ICalendar (RFC 5545) and the feed calendar.ics |
Implemented and tested |
The component PhilCalendar:Calendar, its templates, its Stimulus controller and its stylesheet |
Implemented and tested |
The almanac's dates among the events, and made events: AlmanacItems, AlmanacImport, phil:calendar:import-almanac |
Implemented and tested |
Twig: calendar_occurrences, occurrence_when |
Implemented and tested |
Translations of events and venues: EventTranslation, VenueTranslation, EventTexts |
Implemented and tested |
Attendees and capacity: Attendance, Attendees, AttendancePolicy, DoctrineAttendanceRepository |
Implemented and tested |
A member's calendar, PersonalCalendar; proposals and their workflow, Proposals |
Implemented and tested |
What a member follows and hides, CalendarChoices, its form and template; their feed at a secret address, PersonalFeeds and phil_calendar_personal_ics |
Implemented and tested |
A member's data in the export and the erasure of phil/privacy-bundle, CalendarPrivacy |
Implemented and tested |
The budget of a request, ExpansionBudget: occurrences and repeating events read, the stop logged |
Implemented and tested |
A page of its own for an occurrence; the calendar printed, PrintableCalendar |
Implemented and tested |
| Views laid out in PHP: periods, the month's grid, the week and the day by the hour shared between resources, the list grouped by days, the posters, days in words | Implemented and tested |
| The controller and the stylesheet mapped for AssetMapperBundle, the controller fetched lazily | Implemented and tested |
| Ticketing: selling the places of an occurrence | Outside the package: an application's AttendancePolicy and the commerce packages |
| Federation with other servers, ActivityPub | Outside the package: calendar-activitypub, a package of its own to come |
| "Add to calendar" links of an occurrence | Waiting for a stable Symfony UX CalendarLink; the iCalendar feeds are the bundle's |
Documentation
| Document | What it covers |
|---|---|
| Installation | Requirements, registering, configuration, the tables. |
| Events | Event, its occurrences, hosts and tags; Calendar and the budget of a request. |
| Forms and Twig | EventType, EventDraft, the Twig function and filter. |
| Translations | Events and venues in the locales declared, written and read. |
| Attendees, proposals and members' calendars | Attendance and capacity, paid attendance, a member's calendar, what they follow and hide, their feed and their data, proposals and their workflow. |
| The calendar printed | A month per page in PDF. |
| Views | Periods, items and their sources, the month, the week and the day, the list; the component, its look and its accessibility; the almanac. |
| The feed | The routes and the iCalendar files: the calendar's and a member's. |
| Extension points | What an application implements, configures, replaces or relies on. |
| Testing | How the bundle is tested. |
| Reference | Every type of the bundle. |
Quick start
composer require phil/calendar-bundle
$event = $calendar->schedule($draft); // an EventDraft, from EventType $calendar->host($event, 'association', '42'); foreach ($calendar->occurrences($from, $through, 'association', '42') as $occurrence) { // $occurrence->event, $occurrence->start, $occurrence->end }
<twig:PhilCalendar:Calendar view="month" /> {% for occurrence in calendar_occurrences(from, through) %} {{ occurrence.event.title }} — {{ occurrence|occurrence_when }} {% endfor %}
Requirements
PHP 8.5 or later with ext-intl, ext-mbstring and ext-sodium; phil/recurrence, phil/recurrence-bundle, phil/url,
phil/doctrine-behaviours and phil/locale-dimensions 0.1; Doctrine ORM 3.7 and DBAL 4.5; Symfony 8.2's dependency
injection, config, form, HTTP foundation, UID, validator and workflow; PSR-20's clock and PSR-3's logger. Twig,
Symfony UX Live Component with Twig Component and the Stimulus bundle with the recipes of the PHIL UX kit, AssetMapper,
the console, phil/almanac, phil/paged-media, phil/privacy-bundle and phil/taxonomy-bundle are optional.
Contributing
Contributions are welcome on the PHIL monorepo: read the contribution guide and the code of conduct. Report a vulnerability privately, as the security policy explains, never in a public issue.
License
MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.