totten/php-symbol-diff

Identify changes in PHP code by symbol (class/method)

Installs: 36 082

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 2

Forks: 1

Open Issues: 2

pkg:composer/totten/php-symbol-diff

dev-master 2018-05-04 22:36 UTC

This package is auto-updated.

Last update: 2025-10-09 15:51:47 UTC


README

This command compares two PHP source files and identifies the names of any symbols (classes, functions, methods, properties) which were added, removed, or modified.

# Compare two files
php-symbol-diff old.php new.php

# Compare a file with an older revision in git
git show abcd1234:/some/file.php | php-symbol-diff /dev/stdin some/file.php

# Compare all the files in different git commits
git-php-symbol-diff v1.0 v1.1

# Compare all files in a subdirectory for different git commits
git-php-symbol-diff v1.0 v1.1 -- my/sub/dir

Testing

Run phpunit.

Tests are based on \PHPUnit_Framework_TestCase, which is no longer provided by the latest PHPUnit. The tests have been successfully with PHPUnit 3, 4, and 5.