PHP code example of piwind / flarum-diff

1. Go to this page and download the library: Download piwind/flarum-diff library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

piwind / flarum-diff example snippets


[2025-05-26 14:37:35] flarum.ERROR: ReflectionException: Class "TheTurk\Diff\Listeners\PostActions" does not exist in /opt/flarum/vendor/illuminate/container/Container.php:877

Next Illuminate\Contracts\Container\BindingResolutionException: Target class [TheTurk\Diff\Listeners\PostActions] does not exist. in /opt/flarum/vendor/illuminate/container/Container.php:879
bash
php flarum cache:clear
bash
composer update piwind/flarum-diff
php flarum migrate
php flarum cache:clear

  问题的关键在于:Mentions插件返回的值是core.lib.username.deleted_text
  最后检查下来是:$this->commentPost->getFormatter()->render()的传参故障