PHPackages                             juststeveking/feed-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. juststeveking/feed-parser

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

juststeveking/feed-parser
=========================

A simple feed parser for PHP with zero dependencies.

0.0.1(1y ago)515MITPHPPHP ^8.4

Since Jan 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/JustSteveKing/feed-parser)[ Packagist](https://packagist.org/packages/juststeveking/feed-parser)[ GitHub Sponsors](https://github.com/sponsors/juststeveking)[ RSS](/packages/juststeveking-feed-parser/feed)WikiDiscussions main Synced today

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

Feed Generator
==============

[](#feed-generator)

[![Latest Version](https://camo.githubusercontent.com/fc3b2320ef47e9e55098c4adfbeba61d3bc5a24df00bc061fc8b0a5bb80fa5f0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a75737473746576656b696e672f666565642d7061727365722e7376673f7374796c653d666c61742d737175617265266c6162656c3d72656c65617365)](https://packagist.org/packages/juststeveking/feed-parser)[![PHP Version](https://camo.githubusercontent.com/b3d8237975be5f98d4f16fde055fc649f67dcd04e97eb4aa7e8a8ec907ebb55b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6a75737473746576656b696e672f666565642d7061727365722e7376673f7374796c653d666c61742d737175617265)](https://php.net)[![tests](https://github.com/juststeveking/feed-parser/workflows/tests/badge.svg)](https://github.com/juststeveking/feed-parser/workflows/tests/badge.svg)[![Total Downloads](https://camo.githubusercontent.com/ee9e16d3715335c58a3aa64527f21a3434a18ae05a8921969eec1316c07be676/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a75737473746576656b696e672f666565642d7061727365722e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d6d656469756d76696f6c6574726564)](https://packagist.org/packages/juststeveking/feed-parser)

A simple feed parser for PHP with zero dependencies.

Why
---

[](#why)

Most RSS and Atom parsers I have seen are either too complex or have too many dependencies. This is a simple feed parser that can parse both RSS and Atom feeds, with zero dependencies using a simple `file_get_contents` to fetch the feed itself.

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

[](#installation)

```
composer require juststeveking/feed-generator
```

Usage
-----

[](#usage)

This package is designed to be super simple to use.

### Parsing Atom Feeds

[](#parsing-atom-feeds)

```
use JustSteveKing\FeedParser\AtomParser;
use JustSteveKing\FeedParser\FeedIterator;
use JustSteveKing\FeedParser\ValueObjects\AtomEntry;
use JustSteveKing\FeedParser\ValueObjects\AtomFeed;

$iterator = new FeedIterator(
    url: 'https://example.com/feed.atom',
    parser: new AtomParser(),
);

/** @var AtomFeed $item */
foreach ($iterator as $item) {
    echo $item->title(); // The Title of the Feed
    echo $item->link(); // The Link of the Feed
    echo $item->subtitle(); // The Subtitle of the Feed
    echo $item->updated(); // The Updated Date of the Feed
    echo $item->rights(); // The Rights of the Feed
    echo $item->generator(); // The Generator of the Feed

    /** @var AtomEntry $entry */
    foreach ($item->entries() as $entry) {
        echo $entry->title(); // The Title of the Entry
        echo $entry->link(); // The Link of the Entry
        echo $entry->id(); // The ID of the Entry
        echo $entry->updated(); // The Updated Date of the Entry
        echo $entry->summary(); // The Summary of the Entry
        echo $entry->content(); // The Content of the Entry
        echo $entry->author(); // The Author of the Entry
    }
}
```

### Parsing RSS Feeds

[](#parsing-rss-feeds)

```
use JustSteveKing\FeedParser\RssParser;
use JustSteveKing\FeedParser\FeedIterator;
use JustSteveKing\FeedParser\ValueObjects\RssChannel;
use JustSteveKing\FeedParser\ValueObjects\RssItem;

$iterator = new FeedIterator(
    url: 'https://example.com/feed.rss',
    parser: new RssParser(),
);

/** @var RssChannel $item */
foreach ($iterator as $item) {
    echo $item->title(); // The Title of the Feed
    echo $item->link(); // The Link of the Feed
    echo $item->description(); // The Description of the Feed

    /** @var RssItem $entry */
    foreach ($item->items() as $entry) {
        echo $entry->title(); // The Title of the Entry
        echo $entry->link(); // The Link of the Entry
        echo $entry->guid(); // The GUID of the Entry
        echo $entry->pubDate(); // The Published Date of the Entry
        echo $entry->description(); // The Description of the Entry
        echo $entry->author(); // The Author of the Entry
    }
}
```

Testing
-------

[](#testing)

You can run the tests using the following command:

```
composer test
```

Static Analysis
---------------

[](#static-analysis)

You can run PHPStan using the following command:

```
composer stan
```

Code Style
----------

[](#code-style)

You can run Laravel Pint using the following command:

```
composer pint
```

Refactoring
-----------

[](#refactoring)

You can run Rector using the following command:

```
composer refactor
```

Credits
-------

[](#credits)

- [Steve McDougall](https://github.com/JustSteveKing)
- [All Contributors](../../contributors)

LICENSE
-------

[](#license)

The MIT License (MIT). Please see [License File](./LICENSE) for more information.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance39

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

521d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a87fe82b349821ebd49cf57d65c4cd3e33ae0833222a8438d90fe8921ca899ea?d=identicon)[JustSteveKing](/maintainers/JustSteveKing)

---

Top Contributors

[![JustSteveKing](https://avatars.githubusercontent.com/u/6368379?v=4)](https://github.com/JustSteveKing "JustSteveKing (1 commits)")

---

Tags

phpatomrssfeed parser

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/juststeveking-feed-parser/health.svg)

```
[![Health](https://phpackages.com/badges/juststeveking-feed-parser/health.svg)](https://phpackages.com/packages/juststeveking-feed-parser)
```

###  Alternatives

[simplepie/simplepie

A simple Atom/RSS parsing library for PHP

1.6k9.4M87](/packages/simplepie-simplepie)[jason-munro/cypht

Lightweight Open Source webmail written in PHP and JavaScript

1.6k157.9k](/packages/jason-munro-cypht)[eko/feedbundle

A Symfony bundle to build RSS feeds from entities

142587.0k3](/packages/eko-feedbundle)[bnomei/kirby3-feed

Generate a Atom/JSON/RSS-Feed and XML-Sitemap from Pages-Collections

7227.2k](/packages/bnomei-kirby3-feed)[yuzuru-s/parse-rss

This PHP library can easily parse xml files, especially RSS1.0, RSS2.0 and ATOM.

1040.8k](/packages/yuzuru-s-parse-rss)

PHPackages © 2026

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