2017 © Pedro Peláez
 

symfony-bundle fine-diff-bundle

FineDiff Symfony3 Bundle implementation

image

greywolfs/fine-diff-bundle

FineDiff Symfony3 Bundle implementation

  • Monday, October 30, 2017
  • by grey_wolfs
  • Repository
  • 1 Watchers
  • 0 Stars
  • 378 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 14 Versions
  • 13 % Grown

The README.md

FineDiffBundle

Original fine diff library:, (*1)

  • https://github.com/webtown-php/fine-diff-bundle
  • https://github.com/gorhill/PHP-FineDiff
  • http://www.raymondhill.net/finediff/viewdiff-ex.php

Installation

Add to composer

Run in command line:, (*2)

$ composer require greywolfs/fine-diff-bundle

Or add with hand to composer.json:, (*3)

    "require": {
        "greywolfs/fine-diff-bundle": "~1.10"
    }

Register the bundle

Add the app, (*4)

<?php
    // app/AppKernel.php

    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Greywolfs\FineDiffBundle\GreywolfsPHPFineDiffBundle(),
        );
    }

Configure

Optional. You can change the default granularity., (*5)

# app/config/config.yml

greywolfs_fine_diff:
    default_granularity: character # This is the default granularity. Alternatives: 'word', 'sentence' and 'paragraph'

Usage

There are two twig function:, (*6)

  • renderDiff(): compare two strings
  • renderHtmlTextDiff(): compare two strings which contain HTML tags. Remove tags with strip_tags before compare strings
{{ renderDiff(oldValue, newValue) }}
{{ renderDiff(oldValue, newValue, 'word') }}

{{ renderHtmlTextDiff(oldValue, newValue) }}
{{ renderHtmlTextDiff(oldValue, newValue, 'sentence') }}

The Versions

30/10 2017

dev-master

9999999-dev https://github.com/greywolfs/fine-diff-bundle

FineDiff Symfony3 Bundle implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

diff string compare

30/10 2017

1.12

1.12.0.0 https://github.com/greywolfs/fine-diff-bundle

FineDiff Symfony3 Bundle implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

diff string compare

28/10 2017

1.11

1.11.0.0 https://github.com/greywolfs/fine-diff-bundle

FineDiff Symfony3 Bundle implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

diff string compare

23/10 2017

1.10

1.10.0.0 https://github.com/greywolfs/fine-diff-bundle

FineDiff Symfony3 Bundle implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

diff string compare

22/10 2017

1.9

1.9.0.0 https://github.com/greywolfs/fine-diff-bundle

FineDiff Symfony3 Bundle implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

diff string compare

22/10 2017

1.8

1.8.0.0 https://github.com/greywolfs/fine-diff-bundle

FineDiff Symfony3 Bundle implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

diff string compare

22/10 2017

1.7

1.7.0.0 https://github.com/greywolfs/fine-diff-bundle

FineDiff Symfony3 Bundle implementation

  Sources   Download

MIT

The Requires

 

The Development Requires

diff string compare