PHPackages                             ma4nn/php-rss-writer - 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. ma4nn/php-rss-writer

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

ma4nn/php-rss-writer
====================

Yet another simple RSS writer library.

3.0.0(1y ago)3265MITPHPPHP ^8.2

Since May 15Pushed 1y agoCompare

[ Source](https://github.com/ma4nn/php-rss-writer)[ Packagist](https://packagist.org/packages/ma4nn/php-rss-writer)[ Docs](https://github.com/ma4nn/php-rss-writer)[ RSS](/packages/ma4nn-php-rss-writer/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (2)Versions (5)Used By (0)

RSS Writer Library for PHP
==========================

[](#rss-writer-library-for-php)

[![build status](https://github.com/ma4nn/php-rss-writer/actions/workflows/ci.yml/badge.svg)](https://github.com/ma4nn/php-rss-writer/actions/workflows/ci.yml/badge.svg)

`\Suin\RSSWriter` is yet another simple RSS writer library for PHP. This component is Licensed under MIT license.

This library can also be used to publish Podcasts.

This fork of [the original package](https://github.com/suin/php-rss-writer) mainly raises the PHP compatibility level to &gt;= 8.2 and improves code quality.

Quick demo
----------

[](#quick-demo)

```
$feed = new Feed();

$channel = new Channel();
$channel
    ->title('Channel Title')
    ->description('Channel Description')
    ->url('http://blog.example.com')
    ->feedUrl('http://blog.example.com/rss')
    ->language('en-US')
    ->copyright('Copyright 2012, Foo Bar')
    ->pubDate(strtotime('Tue, 21 Aug 2012 19:50:37 +0900'))
    ->lastBuildDate(strtotime('Tue, 21 Aug 2012 19:50:37 +0900'))
    ->ttl(60)
    ->pubsubhubbub('http://example.com/feed.xml', 'http://pubsubhubbub.appspot.com') // This is optional. Specify PubSubHubbub discovery if you want.
    ->appendTo($feed);

// Blog item
$item = new Item();
$item
    ->title('Blog Entry Title')
    ->description('Blog body')
    ->contentEncoded('Blog body')
    ->url('http://blog.example.com/2012/08/21/blog-entry/')
    ->author('john@smith.com')
    ->creator('John Smith')
    ->pubDate(strtotime('Tue, 21 Aug 2012 19:50:37 +0900'))
    ->guid('http://blog.example.com/2012/08/21/blog-entry/', true)
    ->preferCdata(true) // By this, title and description become CDATA wrapped HTML.
    ->appendTo($channel);

// Podcast item
$item = new Item();
$item
    ->title('Some Podcast Entry')
    ->description('Podcast body')
    ->url('http://podcast.example.com/2012/08/21/podcast-entry/')
    ->enclosure('http://podcast.example.com/2012/08/21/podcast.mp3', 4889, 'audio/mpeg')
    ->appendTo($channel);

echo $feed; // or echo $feed->render();
```

Output:

```

    Channel Title
    http://blog.example.com
    Channel Description
    en-US
    Copyright 2012, Foo Bar
    Tue, 21 Aug 2012 10:50:37 +0000
    Tue, 21 Aug 2012 10:50:37 +0000
    60

      Blog Entry Title]]>
      http://blog.example.com/2012/08/21/blog-entry/
      Blog body]]>
      Blog body]]>
      http://blog.example.com/2012/08/21/blog-entry/
      Tue, 21 Aug 2012 10:50:37 +0000
      john@smith.com
      John Smith

      Some Podcast Entry
      http://podcast.example.com/2012/08/21/podcast-entry/
      &lt;div&gt;Podcast body&lt;/div&gt;

```

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

[](#installation)

### Easy installation

[](#easy-installation)

You can install directly via [composer](https://getcomposer.org/):

```
$ composer require ma4nn/php-rss-writer
```

How to use
----------

[](#how-to-use)

The [`examples`](examples) directory contains usage examples for RSSWriter.

If you want to know APIs, please see [`FeedInterface`](src/FeedInterface.php), [`ChannelInterface`](src/ChannelInterface.php) and [`ItemInterface`](src/ItemInterface.php).

How to Test
-----------

[](#how-to-test)

```
$ vendor/bin/phpunit
```

Test older PHP versions with Docker
-----------------------------------

[](#test-older-php-versions-with-docker)

```
$ docker-compose up
```

License
-------

[](#license)

MIT license

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~423 days

Total

2

Last Release

722d ago

Major Versions

2.0.0 → 3.0.02024-07-12

PHP version history (2 changes)2.0.0PHP ^8.1

3.0.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ff492874815eed37664a65070bcd600b4cbe9b0356afa8a9ae2482119fe98e4?d=identicon)[ma4nn](/maintainers/ma4nn)

---

Top Contributors

[![suin](https://avatars.githubusercontent.com/u/855338?v=4)](https://github.com/suin "suin (36 commits)")[![ma4nn](https://avatars.githubusercontent.com/u/26252058?v=4)](https://github.com/ma4nn "ma4nn (23 commits)")[![buffcode](https://avatars.githubusercontent.com/u/2863518?v=4)](https://github.com/buffcode "buffcode (16 commits)")[![maltsev](https://avatars.githubusercontent.com/u/923973?v=4)](https://github.com/maltsev "maltsev (4 commits)")[![localheinz](https://avatars.githubusercontent.com/u/605483?v=4)](https://github.com/localheinz "localheinz (3 commits)")[![christianp](https://avatars.githubusercontent.com/u/19513?v=4)](https://github.com/christianp "christianp (3 commits)")[![marcdenning](https://avatars.githubusercontent.com/u/2893119?v=4)](https://github.com/marcdenning "marcdenning (2 commits)")[![1franck](https://avatars.githubusercontent.com/u/1209308?v=4)](https://github.com/1franck "1franck (1 commits)")[![jeroenmoors](https://avatars.githubusercontent.com/u/1665245?v=4)](https://github.com/jeroenmoors "jeroenmoors (1 commits)")[![Nyholm](https://avatars.githubusercontent.com/u/1275206?v=4)](https://github.com/Nyholm "Nyholm (1 commits)")[![barryp](https://avatars.githubusercontent.com/u/945959?v=4)](https://github.com/barryp "barryp (1 commits)")

---

Tags

phppodcastrssphpfeedrssgeneratorwriter

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ma4nn-php-rss-writer/health.svg)

```
[![Health](https://phpackages.com/badges/ma4nn-php-rss-writer/health.svg)](https://phpackages.com/packages/ma4nn-php-rss-writer)
```

###  Alternatives

[suin/php-rss-writer

Yet another simple RSS writer library for PHP 5.4 or later.

2831.4M21](/packages/suin-php-rss-writer)[rumenx/php-feed

Framework-agnostic PHP Feed generator for Laravel, Symfony, and more.

3665.1k](/packages/rumenx-php-feed)[sokolnikov911/yandex-turbo-pages

PHP7 Yandex Turbo Pages RSS feed generator

4989.6k](/packages/sokolnikov911-yandex-turbo-pages)[tomloprod/radiance

A deterministic mesh gradient avatar generator for PHP.

14010.2k](/packages/tomloprod-radiance)

PHPackages © 2026

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