PHPackages                             philippecharrat/reader-time-bundle - 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. philippecharrat/reader-time-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

philippecharrat/reader-time-bundle
==================================

A tool for calculating the time required to read online content

1.0.1(1mo ago)04MITPHPPHP &gt;=8.1

Since Apr 11Pushed 1mo agoCompare

[ Source](https://github.com/philippeCharrat/reader-time-bundle)[ Packagist](https://packagist.org/packages/philippecharrat/reader-time-bundle)[ RSS](/packages/philippecharrat-reader-time-bundle/feed)WikiDiscussions main Synced 1w ago

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

Reader Time Bundle (Symfony)
============================

[](#reader-time-bundle-symfony)

A Symfony bundle that provides a Twig filter to estimate the time required to read online content (text or rich HTML).

It supports:

- word counting (unicode letters)
- optional rich-content overhead (images + tables)
- per-language reading speed presets (WPM) for several languages

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

[](#requirements)

- PHP &gt;= 8.1
- Symfony FrameworkBundle ^6.0 || ^7.0
- TwigBundle ^6.0 || ^7.0

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

[](#installation)

Install with Composer:

```
composer require philippecharrat/reader-time-bundle
```

Symfony Flex should auto-enable the bundle (depending on your project setup). If not, enable it manually:

```
// config/bundles.php
return [
// ...
PhilippeCharrat\ReaderTimeBundle\ReaderTimeBundle::class => ['all' => true],
];
```

Configuration
-------------

[](#configuration)

Create (or edit) the following file:

```
# config/packages/reader_time.yaml
reader_time:
words_per_minute: 200
minimum_minutes: 1
```

### Options

[](#options)

- words\_per\_minute (int, default: 200, min: 1) Base reading speed used when no langcode preset is provided (or if it is unknown).
- minimum\_minutes (int, default: 1, min: 0) Minimum value returned when content is not empty (use 0 if you want to allow returning 0 for very short content).

Usage (Twig)
------------

[](#usage-twig)

### A Twig filter is provided:

[](#a-twig-filter-is-provided)

```
Filter name: reader_time_minutes
Signature: reader_time_minutes(content, onlyText = false, langcode = null)

```

### Examples

[](#examples)

Estimate from rich HTML (text + images + tables):

```
{{ article.content|reader_time_minutes }}
```

Estimate from plain text only (ignore images/tables):

```
{{ article.content|reader_time_minutes(true) }}
```

Use a language preset (affects WPM):

```
{{ article.content|reader_time_minutes(false, 'fr') }}
```

Available language codes : ar, zh, nl, en, fi, fr, de, he, it, ko, es, sv

How it works (high-level)
-------------------------

[](#how-it-works-high-level)

```
Text is extracted with strip_tags() and normalized whitespace.
Words are counted using a unicode letters regex (\p{L}+).
If onlyText=false, extra time is added for:
    images () with a reduced weight when alt=""
    tables ()

```

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

[](#contributing)

Issues and pull requests are welcome.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance88

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

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

Total

2

Last Release

59d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/66027a1cc92fd86f6ec918d5363e922423ba6c7517d6c2fbfb33b24ab4578a55?d=identicon)[philippeCharrat](/maintainers/philippeCharrat)

---

Tags

symfonybundletimeSymfony Bundlereading

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/philippecharrat-reader-time-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/philippecharrat-reader-time-bundle/health.svg)](https://phpackages.com/packages/philippecharrat-reader-time-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.5M370](/packages/easycorp-easyadmin-bundle)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1715.6k12](/packages/2lenet-crudit-bundle)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

51090.8k2](/packages/web-auth-webauthn-framework)[web-auth/webauthn-symfony-bundle

FIDO2/Webauthn Security Bundle For Symfony

66474.5k8](/packages/web-auth-webauthn-symfony-bundle)

PHPackages © 2026

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