PHPackages                             rumenx/php-calendar - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. rumenx/php-calendar

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

rumenx/php-calendar
===================

A simple, framework-agnostic PHP package for generating RFC 5545-compliant .ics calendar files. Built with the philosophy that calendar generation should be straightforward, reliable, and work everywhere.

v1.0.2(7mo ago)61.6k↓25%1MITPHPPHP ^8.2CI passing

Since Jun 8Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/RumenDamyanov/php-calendar)[ Packagist](https://packagist.org/packages/rumenx/php-calendar)[ GitHub Sponsors](https://github.com/sponsors/RumenDamyanov)[ RSS](/packages/rumenx-php-calendar/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (6)Used By (1)

php-calendar
============

[](#php-calendar)

[![CI](https://github.com/RumenDamyanov/php-calendar/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/RumenDamyanov/php-calendar/actions/workflows/ci.yml)[![codecov](https://camo.githubusercontent.com/ca1021e6f270fda111d1a2f9c38b77b0879f5dd7f3ec4248fa50d4e183e86bdb/68747470733a2f2f636f6465636f762e696f2f67682f52756d656e44616d79616e6f762f7068702d63616c656e6461722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/RumenDamyanov/php-calendar)

A simple, framework-agnostic PHP package for generating RFC 5545-compliant .ics calendar files. Built with the philosophy that calendar generation should be straightforward, reliable, and work everywhere.

Philosophy
----------

[](#philosophy)

This package follows the Unix philosophy: **do one thing and do it well**. It generates standards-compliant .ics files without unnecessary dependencies, framework coupling, or complexity. Whether you're building a Laravel application, a Symfony project, or plain PHP script, this package just works.

Key principles:

- **Zero dependencies** - Works out of the box
- **Framework-agnostic** - No Laravel/Symfony lock-in
- **Standards-compliant** - Follows RFC 5545 specification
- **Simple API** - Intuitive methods that make sense
- **Modern PHP** - Built for PHP 8.3+ with strict types

Installation
------------

[](#installation)

```
composer require rumenx/php-calendar
```

Quick Start
-----------

[](#quick-start)

```
use Rumenx\Calendar;

// Create a calendar
$calendar = new Calendar();

// Add an event
$calendar->addEvent([
    'summary' => 'Team Meeting',
    'start' => '2025-08-15 10:00:00',
    'end' => '2025-08-15 11:00:00',
    'location' => 'Conference Room',
    'description' => 'Weekly team sync meeting'
]);

// Export as .ics file
$icsContent = $calendar->toIcs();

// Save to file or send as download
file_put_contents('meeting.ics', $icsContent);
```

Real-World Examples
-------------------

[](#real-world-examples)

### Event Registration System

[](#event-registration-system)

```
// Generate calendar file for event registration confirmation
$calendar = new Calendar();
$calendar->addEvent([
    'summary' => 'PHP Conference 2025',
    'start' => '2025-09-20 09:00:00',
    'end' => '2025-09-20 17:00:00',
    'location' => 'Convention Center, Berlin',
    'description' => 'Annual PHP developers conference with talks and workshops.',
    'url' => 'https://phpconf2025.example.com'
]);

// Send as email attachment or download link
return response($calendar->toIcs())
    ->header('Content-Type', 'text/calendar')
    ->header('Content-Disposition', 'attachment; filename="phpconf2025.ics"');
```

### Appointment Booking

[](#appointment-booking)

```
// Doctor appointment with reminder
$calendar = new Calendar();
$calendar->addEvent([
    'summary' => 'Doctor Appointment',
    'start' => '2025-08-25 14:30:00',
    'end' => '2025-08-25 15:00:00',
    'location' => 'Medical Center, Room 205',
    'description' => 'Annual checkup with Dr. Smith',
    'alarm' => [
        'trigger' => '-PT30M', // 30 minutes before
        'description' => 'Appointment reminder'
    ]
]);
```

### Recurring Team Meetings

[](#recurring-team-meetings)

```
// Weekly standup meeting
$calendar = new Calendar();
$calendar->addEvent([
    'summary' => 'Daily Standup',
    'start' => '2025-08-01 09:00:00',
    'end' => '2025-08-01 09:15:00',
    'location' => 'Zoom Meeting Room',
    'description' => 'Daily team standup meeting',
    'rrule' => 'FREQ=DAILY;BYDAY=MO,TU,WE,TH,FR;COUNT=50' // Weekdays only
]);
```

### Multi-Attendee Events

[](#multi-attendee-events)

```
// Project kickoff with team
$calendar = new Calendar();
$calendar->addEvent([
    'summary' => 'Project Alpha Kickoff',
    'start' => '2025-08-10 13:00:00',
    'end' => '2025-08-10 14:30:00',
    'location' => 'Main Conference Room',
    'description' => 'Kickoff meeting for the new Alpha project',
    'attendees' => [
        'mailto:john@company.com',
        'mailto:sarah@company.com',
        'mailto:mike@company.com'
    ],
]);
```

Framework Integration
---------------------

[](#framework-integration)

### Laravel

[](#laravel)

```
// In a controller
public function downloadEvent()
{
    $calendar = new Calendar();
    $calendar->addEvent([
        'summary' => 'Laravel Meetup',
        'start' => '2025-09-15 18:00:00',
        'end' => '2025-09-15 20:00:00',
    ]);

    return response($calendar->toIcs())
        ->header('Content-Type', 'text/calendar')
        ->header('Content-Disposition', 'attachment; filename="meetup.ics"');
}
```

### Symfony

[](#symfony)

```
// In a controller
public function downloadEvent(): Response
{
    $calendar = new Calendar();
    $calendar->addEvent([
        'summary' => 'Symfony Event',
        'start' => '2025-09-15 18:00:00',
        'end' => '2025-09-15 20:00:00',
    ]);

    return new Response(
        $calendar->toIcs(),
        200,
        [
            'Content-Type' => 'text/calendar',
            'Content-Disposition' => 'attachment; filename="event.ics"'
        ]
    );
}
```

Supported Event Properties
--------------------------

[](#supported-event-properties)

- `summary` (required) - Event title/subject
- `start` (required) - Start date/time (YYYY-MM-DD HH:MM:SS)
- `end` (required) - End date/time (YYYY-MM-DD HH:MM:SS)
- `location` - Event location
- `description` - Event description
- `rrule` - Recurrence rule (RFC 5545 format)
- `attendees` - Array of email addresses
- `organizer` - Organizer email address
- `alarm` - Alarm/reminder settings
- `url` - Event URL

Development
-----------

[](#development)

```
# Install dependencies
composer install

# Run tests
composer test

# Run static analysis
composer analyze

# Check code style
composer style

# Fix code style
composer style-fix

# Run all quality checks
composer quality
```

Contributing
------------

[](#contributing)

Contributions are welcome! This package follows PSR-12 coding standards and requires 95%+ test coverage. Please ensure your contributions include appropriate tests.

Please see our [Contributing Guide](CONTRIBUTING.md) for details on how to get started.

Security
--------

[](#security)

If you discover any security-related issues, please review our [Security Policy](SECURITY.md) for information on how to report them responsibly.

Changelog
---------

[](#changelog)

All notable changes are documented in our [Changelog](CHANGELOG.md).

Support the Project
-------------------

[](#support-the-project)

If you find this project useful, please consider [supporting its development](FUNDING.md).

License
-------

[](#license)

This project is licensed under the [MIT License](LICENSE.md).

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance75

Regular maintenance activity

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~36 days

Total

4

Last Release

237d ago

PHP version history (3 changes)v1.0.0PHP ^8.3 || ^8.4

v1.0.1PHP &gt;=8.3

v1.0.2PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/48dce3e6200e787e75a4a14e0d31738d112261fe0877f15f74d3fb2c2a626229?d=identicon)[RumenX](/maintainers/RumenX)

---

Top Contributors

[![RumenDamyanov](https://avatars.githubusercontent.com/u/1458253?v=4)](https://github.com/RumenDamyanov "RumenDamyanov (22 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (8 commits)")

---

Tags

calendarcomposereventicslaravelphpsymfony

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/rumenx-php-calendar/health.svg)

```
[![Health](https://phpackages.com/badges/rumenx-php-calendar/health.svg)](https://phpackages.com/packages/rumenx-php-calendar)
```

###  Alternatives

[timnarr/kirby-obfuscate-email

This plugin provides field methods to obfuscate email addresses.

191.3k](/packages/timnarr-kirby-obfuscate-email)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
