PHPackages                             ianm/flarum-diff - 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. [Logging &amp; Monitoring](/categories/logging)
4. /
5. ianm/flarum-diff

Abandoned → [the-turk/flarum-diff](/?search=the-turk%2Fflarum-diff)ArchivedFlarum-extension[Logging &amp; Monitoring](/categories/logging)

ianm/flarum-diff
================

View post edit histories.

3.0.0(4y ago)22752MITPHP

Since Feb 10Pushed 4y agoCompare

[ Source](https://github.com/imorland/flarum-diff)[ Packagist](https://packagist.org/packages/ianm/flarum-diff)[ RSS](/packages/ianm-flarum-diff/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (3)Dependencies (2)Versions (29)Used By (0)

Diff for Flarum
===============

[](#diff-for-flarum)

[![MIT license](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://github.com/imorland/flarum-diff/blob/master/LICENSE) [![Latest Stable Version](https://camo.githubusercontent.com/4cc50e2677e89c66c786f05edaf38c25c643d0b8761e39bb6743cb680319e9ae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f69616e6d2f666c6172756d2d646966662e737667)](https://packagist.org/packages/ianm/flarum-diff) [![Total Downloads](https://camo.githubusercontent.com/22cd292b538edd8dbe553a09e1b11adb478ad0da1b534347136fe01791590475/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f69616e6d2f666c6172756d2d646966662e737667)](https://packagist.org/packages/ianm/flarum-diff)

This is a temporary maintained fork
-----------------------------------

[](#this-is-a-temporary-maintained-fork)

> I have [volunteered](https://discuss.flarum.org/d/22779-diff-for-flarum/136) to maintain this extension whilst [Kylo / the-turk is away](https://discuss.flarum.org/d/22779-diff-for-flarum/132). My hope is that this fork can be re-integrated in due course.

> ~ IanM - December 2020

This extension adds a "post revision history" feature to your [Flarum](https://github.com/flarum) forum. I did this one for my personal Flarum project and decided to share it.

Screenshots:

[![Diff Collage](https://camo.githubusercontent.com/98fae941c11f19d4bf9968b140a54ca35798c3cb6f7761d93b710302ce1355cd/68747470733a2f2f692e6962622e636f2f464a7977484b6e2f72737a2d646966662d636f6c6c6167652e706e67)](https://camo.githubusercontent.com/98fae941c11f19d4bf9968b140a54ca35798c3cb6f7761d93b710302ce1355cd/68747470733a2f2f692e6962622e636f2f464a7977484b6e2f72737a2d646966662d636f6c6c6167652e706e67)

- [Post-Stream Item](https://i.ibb.co/4m21pnM/post-Stream-Item.png)
- [Dropdown List](https://i.ibb.co/PTTcWCw/dropdown-List.png)

Features
--------

[](#features)

- Based on [jfcherng/php-diff](https://github.com/jfcherng/php-diff) repository (this one is forked from [chrisboulton/php-diff](https://github.com/chrisboulton/php-diff) since it's no longer maintained).
- Option for **line** (default), **word** and **char** level diffs.
- Three render modes including "Inline", "Side By Side" &amp; "Combined".
- Archive old revisions using cron jobs or manually.
- Delete revisions or rollback to certain revision.
- Supports `fof/nightmode`, `the-turk/flarum-quiet-edits`.
- Supports all browsers which are supporting [css-grid](https://caniuse.com/#feat=css-grid).

Also, it won't load (and cache) anything until you click the "Edited" button so no need to worry about loading times.

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

[](#requirements)

[![php](https://camo.githubusercontent.com/7fc1f1fc7fa04130387fbd0768054c26f15f421e337546a2ed4a58a433ff84de/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545372e312e332d626c75653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/7fc1f1fc7fa04130387fbd0768054c26f15f421e337546a2ed4a58a433ff84de/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545372e312e332d626c75653f7374796c653d666c61742d737175617265) [![ext-iconv](https://camo.githubusercontent.com/9b62dc2b788d4a71cbbcf8abdfac07be8d19a76f19394e4c1dce5551a827b49f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6578742d69636f6e762d627269676874677265656e3f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/9b62dc2b788d4a71cbbcf8abdfac07be8d19a76f19394e4c1dce5551a827b49f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6578742d69636f6e762d627269676874677265656e3f7374796c653d666c61742d737175617265)

You can check your php version by running `php -v` and check if `iconv` is installed by running `php --ri iconv` (which should display `iconv support => enabled`).

You also need to update `s9e/text-formatter` to v2.3.7 for syntax highlighting in "Preview" mode (**skip this step** if you didn't update `flarum/core` to beta 12 yet):

```
composer update s9e/text-formatter:2.3.7

```

Conflictions
------------

[](#conflictions)

This extension conflicts with:

- [dem13n/nickname-changer](https://discuss.flarum.org/d/21238-nickname-changer) package. Use [fof/username-request](https://discuss.flarum.org/d/20956-friendsofflarum-username-request) instead.
- If you're using [the-turk/flarum-edit-notifications](https://discuss.flarum.org/d/22896-edit-notifications/17), you should update it to v0.1.4

```
composer update the-turk/flarum-edit-notifications:0.1.4
```

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

[](#installation)

Use [Bazaar](https://discuss.flarum.org/d/5151) or install manually:

```
composer require ianm/flarum-diff
```

Updating
--------

[](#updating)

```
composer update ianm/flarum-diff
php flarum migrate
php flarum cache:clear
```

Usage
-----

[](#usage)

Enable the extension and set the permissions. You're ready to go!

### Archive Old Revisions

[](#archive-old-revisions)

If **x ≥ A** (where the **x** is post's revision count), first **y=mx+b** revisions for the post can be stored as merged &amp; compressed `BLOB` in a new table (which is called `post_edit_histories_archive`). Specify the **A**, **m** and **b** from the settings modal. Float values of **y** will be rounded to the next lowest integer value. It's recommended to archive old revisions if you want to save storage volume but ***not recommended if you don't want to***.

If you want to archive old revisions, please consider enabling *cron job option* from the settings modal. I set a weekly cron job which is working on sundays at 02:00 AM (nothing special) using `diff:archive` command\*\*. Otherwise, it'll try to find &amp; archive old revisions for the post as soon as `Post\Revised` event fires or wait for your `php flarum diff:archive` command.

> \*\*: Here is the only Cron entry you need to add to your (Linux) server:
>
> `* * * * * php //flarum schedule:run >> /dev/null 2>&1`
>
> This Cron will call the Laravel command scheduler every minute. Then, Laravel evaluates your scheduled tasks and runs the tasks that are due.

Links
-----

[](#links)

- [Flarum Discuss post](https://discuss.flarum.org/d/22779-diff-for-flarum)
- [Source code on GitHub](https://github.com/imorland/flarum-diff)
- [Changelog](https://github.com/the-turk/imorland/blob/master/CHANGELOG.md)
- [Report an issue](https://github.com/imorland/flarum-diff/issues)
- [Download via Packagist](https://packagist.org/packages/ianm/flarum-diff)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 58.1% 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 ~24 days

Recently: every ~89 days

Total

20

Last Release

1820d ago

Major Versions

0.1.0-beta.7 → 1.0.02020-03-28

0.2.0-beta.1 → 2.0.0-beta.12021-02-16

2.1.0 → 3.0.02021-05-24

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/16573496?v=4)[IanM](/maintainers/imorland)[@imorland](https://github.com/imorland)

---

Top Contributors

[![hasan-ozbey](https://avatars.githubusercontent.com/u/48382593?v=4)](https://github.com/hasan-ozbey "hasan-ozbey (18 commits)")[![imorland](https://avatars.githubusercontent.com/u/16573496?v=4)](https://github.com/imorland "imorland (5 commits)")[![flarum-bot](https://avatars.githubusercontent.com/u/39334649?v=4)](https://github.com/flarum-bot "flarum-bot (4 commits)")[![rob006](https://avatars.githubusercontent.com/u/5972388?v=4)](https://github.com/rob006 "rob006 (2 commits)")[![askvortsov1](https://avatars.githubusercontent.com/u/38059171?v=4)](https://github.com/askvortsov1 "askvortsov1 (1 commits)")[![Csineneo](https://avatars.githubusercontent.com/u/1370009?v=4)](https://github.com/Csineneo "Csineneo (1 commits)")

---

Tags

diffhistoryloggerflarumtrackeredit

### Embed Badge

![Health badge](/badges/ianm-flarum-diff/health.svg)

```
[![Health](https://phpackages.com/badges/ianm-flarum-diff/health.svg)](https://phpackages.com/packages/ianm-flarum-diff)
```

###  Alternatives

[apix/log

Minimalist, thin and fast PSR-3 compliant (multi-bucket) logger.

511.0M18](/packages/apix-log)[bonny/wordpress-simple-history

View recent changes made within WordPress, directly on your dashboard or on a separate page.

3156.9k](/packages/bonny-wordpress-simple-history)[amphp/log

Non-blocking logging for PHP based on Amp, Revolt, and Monolog.

402.6M70](/packages/amphp-log)[logtail/monolog-logtail

Logtail handler for Monolog

233.2M3](/packages/logtail-monolog-logtail)[bref/logger

All you need to log with Bref on AWS Lambda

331.5M8](/packages/bref-logger)

PHPackages © 2026

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