PHPackages                             fredbradley/socs-calendar-ics-parser - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. fredbradley/socs-calendar-ics-parser

ActivePackage[Parsing &amp; Serialization](/categories/parsing)

fredbradley/socs-calendar-ics-parser
====================================

A PHP Script that parses an ICS file from SOCS, in a readable format to display elsewhere.

2.0.0(4y ago)24.1k2[2 PRs](https://github.com/fredbradley/socs-calendar-ics-parser/pulls)AGPL-3.0-or-laterPHPPHP ^8.0|^8.1

Since Jul 20Pushed 3y ago1 watchersCompare

[ Source](https://github.com/fredbradley/socs-calendar-ics-parser)[ Packagist](https://packagist.org/packages/fredbradley/socs-calendar-ics-parser)[ RSS](/packages/fredbradley-socs-calendar-ics-parser/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (1)Versions (20)Used By (0)

SOCS .ics Calendar Parser
=========================

[](#socs-ics-calendar-parser)

A PHP Script that parses an ICS file from SOCS, in a readable format to display elsewhere.

Features
--------

[](#features)

- Super easy to use.
- Once you've included it in your composer package, just one line of code will get you a PHP array of Event Objects.
- Compatible with Wordpress transients, if you use Wordpress.
- Compatible with Laravel Caching, if you use Laravel.
- Actively managed - if you have a feature or idea request, please let me know, or even better - submit a [pull request](https://github.com/fredbradley/socs-calendar-ics-parser/pulls).

Requirements
------------

[](#requirements)

This project requires PHP 7. I'm too lazy to write for PHP5.6 these days. Get with the program!

How to install
--------------

[](#how-to-install)

```
composer install fredbradley/socs-calendar-ics-parser

```

Examples
--------

[](#examples)

### Wordpress Widget Example

[](#wordpress-widget-example)

This is written to work with Wordpress and even has Wordpress Caching (`set_transient`) functionality built in, to speed up page load times.

If you want to see an example of a widget that uses this code, [please see this piece of code](https://github.com/cranleighschool/cranleigh-socs/blob/master/src/Widgets/UpcomingCalendarEventsWidget.php) in my 'cranleigh-socs' plugin. If you like you can install the entire [Cranleigh SOCS Plugin](https://github.com/cranleighschool/cranleigh-socs), but be aware it's written in Bootstrap 3 with HTML markup specifically for our sites.

[![Wordpress Example](https://user-images.githubusercontent.com/1639226/43061908-eca937b6-8e4e-11e8-8bf7-bd2ea0b2b6b5.png)](https://user-images.githubusercontent.com/1639226/43061908-eca937b6-8e4e-11e8-8bf7-bd2ea0b2b6b5.png)

If you want some help customising it, I'd be happy to help.

Usage
-----

[](#usage)

### Options

[](#options)

- `minNumEvents` (default: 5)
- `ignoreCache` (default: false) Set to `true` if you don't want get the object from the cache.
- `cacheName` (default: 'calendar-cache') if you have more than one instance of this, you should probably give each instance a unique cache name, so they don't overwrite each other
- `weeksAhead` (default: 15) how many weeks ahead to you want to get the events for

### Basic Example with Default Options

[](#basic-example-with-default-options)

```
$ics_url = "";
$calendar = new \FredBradley\SOCSICSParser\CalendarEvents( $ics_url );

```

### Example with custom options

[](#example-with-custom-options)

```
$ics_url = "";
$options = [
  'minNumEvents' => 10,
  'cacheName' => 'my-music-calendar'
];
$calendar = new \FredBradley\SOCSICSParser\CalendarEvents( $ics_url, $options );

```

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 100% 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 ~73 days

Recently: every ~196 days

Total

17

Last Release

1685d ago

Major Versions

1.0.15 → 2.0.02021-09-30

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1639226?v=4)[Fred Bradley](/maintainers/fredbradley)[@fredbradley](https://github.com/fredbradley)

---

Top Contributors

[![fredbradley](https://avatars.githubusercontent.com/u/1639226?v=4)](https://github.com/fredbradley "fredbradley (62 commits)")

### Embed Badge

![Health badge](/badges/fredbradley-socs-calendar-ics-parser/health.svg)

```
[![Health](https://phpackages.com/badges/fredbradley-socs-calendar-ics-parser/health.svg)](https://phpackages.com/packages/fredbradley-socs-calendar-ics-parser)
```

###  Alternatives

[mtdowling/jmespath.php

Declaratively specify how to extract elements from a JSON document

2.0k472.8M135](/packages/mtdowling-jmespathphp)[opis/closure

A library that can be used to serialize closures (anonymous functions) and arbitrary data.

2.6k230.0M284](/packages/opis-closure)[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[michelf/php-markdown

PHP Markdown

3.5k52.4M345](/packages/michelf-php-markdown)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)

PHPackages © 2026

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