PHPackages                             lukaswhite/podcast-feed-validator - 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. lukaswhite/podcast-feed-validator

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

lukaswhite/podcast-feed-validator
=================================

A PHP library for validating podcast feeds

1.1(3y ago)1459MITPHP

Since Dec 7Pushed 3y ago1 watchersCompare

[ Source](https://github.com/lukaswhite/podcast-feed-validator)[ Packagist](https://packagist.org/packages/lukaswhite/podcast-feed-validator)[ RSS](/packages/lukaswhite-podcast-feed-validator/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (4)Versions (5)Used By (0)

Podcast Feed Validator
======================

[](#podcast-feed-validator)

A PHP library for validating podcast feeds.

Checks the validity of the feed; for example whether it's XML, RSS, whether it has the appropriate namespace.

It warns if certain fields are missing; for example, the fields that iTunes requires.

It also recommends fields that iTunes recommend, but which are not required.

> Note that I deliberately haven't added a method to fetch a remote feed, so as not to add additional dependencies; I'd recommend using Guzzle.

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

[](#installation)

```
composer require lukaswhite/podcast-feed-validator
```

Usage
-----

[](#usage)

```
use Lukaswhite\PodcastFeedValidator\Validator;

$validator = new Validator();

$validator->load('/path/to/feed.rss');
// or
$validator->setContent(/** raw content */);

$result = $validator->run();

if ($result->fails()) {
    // ...do something
}
```

The Result
----------

[](#the-result)

The return value is an object that encapsulates the errors, warnings and recommendations.

Each of these are just strings, and are defined as constants in the relevant classes.

Note that typically, if an error has occurred then validation has failed before it starts generating warnings or recommendations. For example if the provided feed isn't XML, then it cannot check for the existence of certain fields.

```
if ($result->hasErrors()) {
    foreach ($result->getErrors() as $error) {

    }
}

if ($result->hasWarnings()) {
    foreach ($result->getWarnings() as $error) {

    }
}

if ($result->hasRecommendations()) {
    foreach ($result->getRecommendations() as $error) {

    }
}
```

The result object also includes individual results for the episodes.

Example
-------

[](#example)

Suppose you provide the following XML:

```

	Minimal Example
	https://example.com
	Just an example.

		Episode One

```

This will return `FALSE`:

```
$result->hasErrors();
```

The following will all return `TRUE`:

```
$result->hasWarnings();
$result->hasWarning(Warning::NO_LANGUAGE);
$result->hasWarning(Warning::NO_ARTWORK);
$result->hasWarning(Warning::NO_CATEGORIES);
$result->hasWarning(Warning::NO_EXPLICIT);
```

It will also make recommendations, so the following will also return `TRUE`:

```
$result->hasRecommendations();
$result->hasRecommendation(Recommendation::ADD_AUTHOR);
$result->hasRecommendation(Recommendation::ADD_OWNER);
```

For the episode:

```
$result = $validator->run()->episodes()[0];
$result->hasWarning(Warning::NO_MEDIA);
$result->hasRecommendation(Recommendation::ADD_LINK);
$result->hasRecommendation(Recommendation::ADD_GUID);
$result->hasRecommendation(Recommendation::ADD_PUB_DATE);
$result->hasRecommendation(Recommendation::ADD_DESCRIPTION);
$result->hasRecommendation(Recommendation::ADD_EXPLICIT);
$result->hasRecommendation(Recommendation::ADD_ARTWORK);
$result->hasRecommendation(Recommendation::ADD_DURATION);
```

See the tests for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Every ~298 days

Total

3

Last Release

1387d ago

Major Versions

0.0.1 → 1.02020-12-07

### Community

Maintainers

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

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lukaswhite-podcast-feed-validator/health.svg)

```
[![Health](https://phpackages.com/badges/lukaswhite-podcast-feed-validator/health.svg)](https://phpackages.com/packages/lukaswhite-podcast-feed-validator)
```

###  Alternatives

[symfony/webpack-encore-bundle

Integration of your Symfony app with Webpack Encore

95363.0M496](/packages/symfony-webpack-encore-bundle)

PHPackages © 2026

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