2017 © Pedro Peláez
 

library semantic-diff

A library for performing semantic diffs of PHP code

image

joshdifabio/semantic-diff

A library for performing semantic diffs of PHP code

  • Friday, January 30, 2015
  • by joshdifabio
  • Repository
  • 5 Watchers
  • 14 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Semantic Diff for PHP

Build Status Coveralls Codacy Badge, (*1)

API status

Until the first tag is created, this package should be considered very unstable., (*2)

Usage

use PhpParser\Parser;
use PhpParser\Lexer;
use SemanticDiff\Diff\Factory;
use SemanticDiff\Status;

$phpParser = new Parser(new Lexer);

$diff = (new Factory)->createDiff(
    $phpParser->parse($oldPhpCode),
    $phpParser->parse($newPhpCode)
);

$status = $diff->getStatus();

/*
 * $status is now one of:
 *  Status::NO_CHANGES
 *  Status::API_ADDITIONS
 *  Status::INTERNAL_CHANGES
 *  Status::API_CHANGES
 *  Status::INCOMPATIBLE_API
 */

License

Semantic Diff is released under the MIT license., (*3)

The Versions

30/01 2015

dev-master

9999999-dev

A library for performing semantic diffs of PHP code

  Sources   Download

MIT

The Requires

 

The Development Requires

by Joshua Di Fabio