PHPackages                             huseyinfiliz/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. huseyinfiliz/flarum-diff

ActiveFlarum-extension[Logging &amp; Monitoring](/categories/logging)

huseyinfiliz/flarum-diff
========================

View post edit histories.

1.0.1(4mo ago)4893↑562.5%1[1 issues](https://github.com/huseyinfiliz/flarum-diff/issues)MITPHP

Since Dec 9Pushed 4mo agoCompare

[ Source](https://github.com/huseyinfiliz/flarum-diff)[ Packagist](https://packagist.org/packages/huseyinfiliz/flarum-diff)[ RSS](/packages/huseyinfiliz-flarum-diff/feed)WikiDiscussions 2.x Synced yesterday

READMEChangelog (6)Dependencies (4)Versions (9)Used By (0)

Diff for Flarum 2.x
===================

[](#diff-for-flarum-2x)

[![MIT license](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](https://github.com/huseyinfiliz/flarum-diff/blob/master/LICENSE) [![Latest Stable Version](https://camo.githubusercontent.com/077c52b497d22f6b0ce9f82b3e984fa1f21b4b91492e60938c73b02b3cfa89ae/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6875736579696e66696c697a2f666c6172756d2d646966662e737667)](https://packagist.org/packages/huseyinfiliz/flarum-diff) [![Total Downloads](https://camo.githubusercontent.com/393a9c11f13783a9452f92964c985d9e6a7d67959e80df8a5a39e782eb69793b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6875736579696e66696c697a2f666c6172756d2d646966662e737667)](https://packagist.org/packages/huseyinfiliz/flarum-diff)

This extension adds a "post revision history" feature to your [Flarum](https://github.com/flarum) forum.

> **Note:** This is the Flarum 2.x compatible version of the original [the-turk/flarum-diff](https://github.com/the-turk/flarum-diff) extension (which supports Flarum 1.8.x). This fork has been updated to work with Flarum 2.0 and later versions.

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 `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/5b3c68237d8b01730b294e937252ffdc4425898fb9d7523aaf4ac49b4d4de498/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d254532253839254135382e312d626c75653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/5b3c68237d8b01730b294e937252ffdc4425898fb9d7523aaf4ac49b4d4de498/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d254532253839254135382e312d626c75653f7374796c653d666c61742d737175617265) [![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`).

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

[](#installation)

```
composer require huseyinfiliz/flarum-diff:"*"
```

Updating
--------

[](#updating)

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

Upgrading from the-turk/flarum-diff
-----------------------------------

[](#upgrading-from-the-turkflarum-diff)

> ⚠️ **IMPORTANT: Database Backup Required**
>
> Before upgrading, **you must backup your database**. While our tests showed no data loss during migration, there is always a risk when upgrading major versions. Your revision history data is stored in the `post_edit_histories` and `post_edit_histories_archive` tables.
>
> In our tests, all revision data was preserved successfully after the upgrade.

> ℹ️ **About Settings Migration**
>
> Extension settings from the-turk/flarum-diff (1.8.x) **will not be transferred** to this version. This is because the settings prefix has changed from `the-turk-diff.*` to `huseyinfiliz-diff.*`.
>
> **This is not a critical issue** - after installing this extension, you simply need to configure your settings manually in the admin panel. This only affects display preferences (detail level, neighbor lines, merge threshold, archive options, etc.) and **does not affect your revision history data in any way**. All your stored revisions will continue to work normally with the default settings until you customize them.

To upgrade from the original extension:

1. **Backup your database** (mandatory)
2. Disable the old extension in admin panel
3. Remove the old extension: ```
    composer remove the-turk/flarum-diff
    ```
4. Upgrade Flarum to 2.0: ```
    composer require flarum/core:"^2.0"
    # Follow Flarum's upgrade guide
    ```
5. Install this extension: ```
    composer require huseyinfiliz/flarum-diff:"*"
    ```
6. Run migrations and clear cache: ```
    php flarum migrate
    php flarum cache:clear
    ```
7. Enable the extension in admin panel
8. **Configure your settings** in the admin panel (settings from 1.8.x will not be migrated)

**Summary:** Your revision history data will be fully preserved. Only extension settings need to be reconfigured manually.

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. See [this discussion](https://discuss.flarum.org/d/24118-setup-the-flarum-scheduler-using-cron) for setting up the scheduler.

Links
-----

[](#links)

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

Credits
-------

[](#credits)

- Original extension by [Hasan Özbey (the-turk)](https://github.com/the-turk)
- Flarum 2.x compatibility by [Hüseyin Filiz](https://github.com/huseyinfiliz)

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance72

Regular maintenance activity

Popularity24

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

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

Total

8

Last Release

125d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/09c355d62c7dcfc040309947946c06155947883a72b6b0c7a354c7d93453fad1?d=identicon)[huseyinfiliz](/maintainers/huseyinfiliz)

---

Top Contributors

[![huseyinfiliz](https://avatars.githubusercontent.com/u/37220000?v=4)](https://github.com/huseyinfiliz "huseyinfiliz (22 commits)")[![hasan-ozbey](https://avatars.githubusercontent.com/u/48382593?v=4)](https://github.com/hasan-ozbey "hasan-ozbey (21 commits)")[![flarum-bot](https://avatars.githubusercontent.com/u/39334649?v=4)](https://github.com/flarum-bot "flarum-bot (5 commits)")[![imorland](https://avatars.githubusercontent.com/u/16573496?v=4)](https://github.com/imorland "imorland (5 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/huseyinfiliz-flarum-diff/health.svg)

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

###  Alternatives

[flarum-lang/russian

Russian language pack for Flarum.

12128.3k](/packages/flarum-lang-russian)[bonny/wordpress-simple-history

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

3157.6k](/packages/bonny-wordpress-simple-history)[apix/log

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

521.1M21](/packages/apix-log)[flarum-lang/french

French language pack to localize the Flarum forum software plus its official and third-party extensions.

1938.7k](/packages/flarum-lang-french)[fof/discussion-language

Specify the language a discussion is written in &amp; sort by language

1034.8k4](/packages/fof-discussion-language)

PHPackages © 2026

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