├── .gitignore ├── LICENSE ├── Makefile ├── README.md ├── bin └── git-php-diff ├── box.json ├── composer.json ├── composer.lock └── doc ├── example-git-diff.png └── example-git-php-diff.png /.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | git-php-diff.phar 3 | composer.phar 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: install 2 | 3 | install: vendor 4 | 5 | vendor: composer.phar composer.lock 6 | php composer.phar install 7 | 8 | composer.phar: 9 | $(eval EXPECTED_SIGNATURE = "$(shell wget -q -O - https://composer.github.io/installer.sig)") 10 | $(eval ACTUAL_SIGNATURE = "$(shell php -r "copy('https://getcomposer.org/installer', 'composer-setup.php'); echo hash_file('SHA384', 'composer-setup.php');")") 11 | @if [ "$(EXPECTED_SIGNATURE)" != "$(ACTUAL_SIGNATURE)" ]; then echo "Invalid signature"; exit 1; fi 12 | php composer-setup.php 13 | rm composer-setup.php 14 | 15 | 16 | build: install git-php-diff.phar 17 | 18 | git-php-diff.phar: $(shell find bin/ -type f) composer.lock box.json 19 | ./vendor/bin/box build 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # git php diff 2 | 3 | Display the git diff of your PHP files using an AST. 4 | 5 | ## Example 6 | 7 | If you have have some PHP code like this: 8 | 9 | ```php 10 | setTty(true); 23 | $process->run(); 24 | } else { 25 | $filename = $_SERVER['argv'][1]; 26 | $code = file_get_contents($filename); 27 | 28 | if (getenv('MAKEASTDIFF') != 1) { 29 | echo $code; 30 | exit(0); 31 | } 32 | 33 | echo getmygid(); 34 | 35 | $parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP5); 36 | 37 | try { 38 | $stmts = $parser->parse($code); 39 | $dumper = new PhpParser\NodeDumper(['dumpComments' => true]); 40 | echo $dumper->dump($stmts), "\n"; 41 | } catch (Error $e) { 42 | echo $filename . ' - Parse Error: ', $e->getMessage(); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /box.json: -------------------------------------------------------------------------------- 1 | { 2 | "chmod": "0755", 3 | "files": [ 4 | "vendor/bin/php-parse" 5 | ], 6 | "finder": [ 7 | { 8 | "name": "*.php", 9 | "exclude": [ 10 | ], 11 | "in": "vendor" 12 | } 13 | ], 14 | "main": "bin/git-php-diff", 15 | "output": "git-php-diff.phar", 16 | "stub": true 17 | } 18 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "require-dev": { 3 | "kherge/box": "^2.7" 4 | }, 5 | "require": { 6 | "nikic/php-parser": "^3.0", 7 | "symfony/process": "^3.2" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "5e9354f8c665fb29d130e9465c59aa38", 8 | "packages": [ 9 | { 10 | "name": "nikic/php-parser", 11 | "version": "v3.0.2", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/nikic/PHP-Parser.git", 15 | "reference": "adf44419c0fc014a0f191db6f89d3e55d4211744" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/adf44419c0fc014a0f191db6f89d3e55d4211744", 20 | "reference": "adf44419c0fc014a0f191db6f89d3e55d4211744", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "ext-tokenizer": "*", 25 | "php": ">=5.5" 26 | }, 27 | "require-dev": { 28 | "phpunit/phpunit": "~4.0|~5.0" 29 | }, 30 | "bin": [ 31 | "bin/php-parse" 32 | ], 33 | "type": "library", 34 | "extra": { 35 | "branch-alias": { 36 | "dev-master": "3.0-dev" 37 | } 38 | }, 39 | "autoload": { 40 | "psr-4": { 41 | "PhpParser\\": "lib/PhpParser" 42 | } 43 | }, 44 | "notification-url": "https://packagist.org/downloads/", 45 | "license": [ 46 | "BSD-3-Clause" 47 | ], 48 | "authors": [ 49 | { 50 | "name": "Nikita Popov" 51 | } 52 | ], 53 | "description": "A PHP parser written in PHP", 54 | "keywords": [ 55 | "parser", 56 | "php" 57 | ], 58 | "time": "2016-12-06T11:30:35+00:00" 59 | }, 60 | { 61 | "name": "symfony/process", 62 | "version": "v3.2.2", 63 | "source": { 64 | "type": "git", 65 | "url": "https://github.com/symfony/process.git", 66 | "reference": "350e810019fc52dd06ae844b6a6d382f8a0e8893" 67 | }, 68 | "dist": { 69 | "type": "zip", 70 | "url": "https://api.github.com/repos/symfony/process/zipball/350e810019fc52dd06ae844b6a6d382f8a0e8893", 71 | "reference": "350e810019fc52dd06ae844b6a6d382f8a0e8893", 72 | "shasum": "" 73 | }, 74 | "require": { 75 | "php": ">=5.5.9" 76 | }, 77 | "type": "library", 78 | "extra": { 79 | "branch-alias": { 80 | "dev-master": "3.2-dev" 81 | } 82 | }, 83 | "autoload": { 84 | "psr-4": { 85 | "Symfony\\Component\\Process\\": "" 86 | }, 87 | "exclude-from-classmap": [ 88 | "/Tests/" 89 | ] 90 | }, 91 | "notification-url": "https://packagist.org/downloads/", 92 | "license": [ 93 | "MIT" 94 | ], 95 | "authors": [ 96 | { 97 | "name": "Fabien Potencier", 98 | "email": "fabien@symfony.com" 99 | }, 100 | { 101 | "name": "Symfony Community", 102 | "homepage": "https://symfony.com/contributors" 103 | } 104 | ], 105 | "description": "Symfony Process Component", 106 | "homepage": "https://symfony.com", 107 | "time": "2017-01-02T20:32:22+00:00" 108 | } 109 | ], 110 | "packages-dev": [ 111 | { 112 | "name": "doctrine/annotations", 113 | "version": "v1.2.7", 114 | "source": { 115 | "type": "git", 116 | "url": "https://github.com/doctrine/annotations.git", 117 | "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" 118 | }, 119 | "dist": { 120 | "type": "zip", 121 | "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", 122 | "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", 123 | "shasum": "" 124 | }, 125 | "require": { 126 | "doctrine/lexer": "1.*", 127 | "php": ">=5.3.2" 128 | }, 129 | "require-dev": { 130 | "doctrine/cache": "1.*", 131 | "phpunit/phpunit": "4.*" 132 | }, 133 | "type": "library", 134 | "extra": { 135 | "branch-alias": { 136 | "dev-master": "1.3.x-dev" 137 | } 138 | }, 139 | "autoload": { 140 | "psr-0": { 141 | "Doctrine\\Common\\Annotations\\": "lib/" 142 | } 143 | }, 144 | "notification-url": "https://packagist.org/downloads/", 145 | "license": [ 146 | "MIT" 147 | ], 148 | "authors": [ 149 | { 150 | "name": "Roman Borschel", 151 | "email": "roman@code-factory.org" 152 | }, 153 | { 154 | "name": "Benjamin Eberlei", 155 | "email": "kontakt@beberlei.de" 156 | }, 157 | { 158 | "name": "Guilherme Blanco", 159 | "email": "guilhermeblanco@gmail.com" 160 | }, 161 | { 162 | "name": "Jonathan Wage", 163 | "email": "jonwage@gmail.com" 164 | }, 165 | { 166 | "name": "Johannes Schmitt", 167 | "email": "schmittjoh@gmail.com" 168 | } 169 | ], 170 | "description": "Docblock Annotations Parser", 171 | "homepage": "http://www.doctrine-project.org", 172 | "keywords": [ 173 | "annotations", 174 | "docblock", 175 | "parser" 176 | ], 177 | "time": "2015-08-31T12:32:49+00:00" 178 | }, 179 | { 180 | "name": "doctrine/lexer", 181 | "version": "v1.0.1", 182 | "source": { 183 | "type": "git", 184 | "url": "https://github.com/doctrine/lexer.git", 185 | "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" 186 | }, 187 | "dist": { 188 | "type": "zip", 189 | "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", 190 | "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", 191 | "shasum": "" 192 | }, 193 | "require": { 194 | "php": ">=5.3.2" 195 | }, 196 | "type": "library", 197 | "extra": { 198 | "branch-alias": { 199 | "dev-master": "1.0.x-dev" 200 | } 201 | }, 202 | "autoload": { 203 | "psr-0": { 204 | "Doctrine\\Common\\Lexer\\": "lib/" 205 | } 206 | }, 207 | "notification-url": "https://packagist.org/downloads/", 208 | "license": [ 209 | "MIT" 210 | ], 211 | "authors": [ 212 | { 213 | "name": "Roman Borschel", 214 | "email": "roman@code-factory.org" 215 | }, 216 | { 217 | "name": "Guilherme Blanco", 218 | "email": "guilhermeblanco@gmail.com" 219 | }, 220 | { 221 | "name": "Johannes Schmitt", 222 | "email": "schmittjoh@gmail.com" 223 | } 224 | ], 225 | "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", 226 | "homepage": "http://www.doctrine-project.org", 227 | "keywords": [ 228 | "lexer", 229 | "parser" 230 | ], 231 | "time": "2014-09-09T13:34:57+00:00" 232 | }, 233 | { 234 | "name": "herrera-io/annotations", 235 | "version": "1.0.1", 236 | "source": { 237 | "type": "git", 238 | "url": "https://github.com/kherge-abandoned/php-annotations.git", 239 | "reference": "7d8b9a536da7f12aad8de7f28b2cb5266bde8da1" 240 | }, 241 | "dist": { 242 | "type": "zip", 243 | "url": "https://api.github.com/repos/kherge-abandoned/php-annotations/zipball/7d8b9a536da7f12aad8de7f28b2cb5266bde8da1", 244 | "reference": "7d8b9a536da7f12aad8de7f28b2cb5266bde8da1", 245 | "shasum": "" 246 | }, 247 | "require": { 248 | "doctrine/annotations": "~1.0", 249 | "php": ">=5.3.3" 250 | }, 251 | "require-dev": { 252 | "herrera-io/phpunit-test-case": "1.*", 253 | "phpunit/phpunit": "3.7.*" 254 | }, 255 | "type": "library", 256 | "extra": { 257 | "branch-alias": { 258 | "dev-master": "1.0-dev" 259 | } 260 | }, 261 | "autoload": { 262 | "psr-0": { 263 | "Herrera\\Annotations": "src/lib" 264 | } 265 | }, 266 | "notification-url": "https://packagist.org/downloads/", 267 | "license": [ 268 | "MIT" 269 | ], 270 | "authors": [ 271 | { 272 | "name": "Kevin Herrera", 273 | "email": "kevin@herrera.io", 274 | "homepage": "http://kevin.herrera.io" 275 | } 276 | ], 277 | "description": "A tokenizer for Doctrine annotations.", 278 | "homepage": "https://github.com/herrera-io/php-annotations", 279 | "keywords": [ 280 | "annotations", 281 | "doctrine", 282 | "tokenizer" 283 | ], 284 | "abandoned": true, 285 | "time": "2014-02-03T17:34:08+00:00" 286 | }, 287 | { 288 | "name": "herrera-io/box", 289 | "version": "1.6.1", 290 | "source": { 291 | "type": "git", 292 | "url": "https://github.com/box-project/box2-lib.git", 293 | "reference": "b55dceb5c65cc831e94ec0786b0b9b15f1103e8e" 294 | }, 295 | "dist": { 296 | "type": "zip", 297 | "url": "https://api.github.com/repos/box-project/box2-lib/zipball/b55dceb5c65cc831e94ec0786b0b9b15f1103e8e", 298 | "reference": "b55dceb5c65cc831e94ec0786b0b9b15f1103e8e", 299 | "shasum": "" 300 | }, 301 | "require": { 302 | "ext-phar": "*", 303 | "phine/path": "~1.0", 304 | "php": ">=5.3.3", 305 | "tedivm/jshrink": "~1.0" 306 | }, 307 | "require-dev": { 308 | "herrera-io/annotations": "~1.0", 309 | "herrera-io/phpunit-test-case": "1.*", 310 | "mikey179/vfsstream": "1.1.0", 311 | "phpseclib/phpseclib": "~0.3", 312 | "phpunit/phpunit": "3.7.*" 313 | }, 314 | "suggest": { 315 | "herrera-io/annotations": "For compacting annotated docblocks.", 316 | "phpseclib/phpseclib": "For verifying OpenSSL signed phars without the phar extension." 317 | }, 318 | "type": "library", 319 | "extra": { 320 | "branch-alias": { 321 | "dev-master": "1.0-dev" 322 | } 323 | }, 324 | "autoload": { 325 | "psr-0": { 326 | "Herrera\\Box": "src/lib" 327 | } 328 | }, 329 | "notification-url": "https://packagist.org/downloads/", 330 | "license": [ 331 | "MIT" 332 | ], 333 | "authors": [ 334 | { 335 | "name": "Kevin Herrera", 336 | "email": "kevin@herrera.io", 337 | "homepage": "http://kevin.herrera.io" 338 | } 339 | ], 340 | "description": "A library for simplifying the PHAR build process.", 341 | "homepage": "https://github.com/box-project/box2-lib", 342 | "keywords": [ 343 | "phar" 344 | ], 345 | "time": "2014-12-03T23:26:45+00:00" 346 | }, 347 | { 348 | "name": "herrera-io/json", 349 | "version": "1.0.3", 350 | "source": { 351 | "type": "git", 352 | "url": "https://github.com/kherge-php/json.git", 353 | "reference": "60c696c9370a1e5136816ca557c17f82a6fa83f1" 354 | }, 355 | "dist": { 356 | "type": "zip", 357 | "url": "https://api.github.com/repos/kherge-php/json/zipball/60c696c9370a1e5136816ca557c17f82a6fa83f1", 358 | "reference": "60c696c9370a1e5136816ca557c17f82a6fa83f1", 359 | "shasum": "" 360 | }, 361 | "require": { 362 | "ext-json": "*", 363 | "justinrainbow/json-schema": ">=1.0,<2.0-dev", 364 | "php": ">=5.3.3", 365 | "seld/jsonlint": ">=1.0,<2.0-dev" 366 | }, 367 | "require-dev": { 368 | "herrera-io/phpunit-test-case": "1.*", 369 | "mikey179/vfsstream": "1.1.0", 370 | "phpunit/phpunit": "3.7.*" 371 | }, 372 | "type": "library", 373 | "extra": { 374 | "branch-alias": { 375 | "dev-master": "1.0-dev" 376 | } 377 | }, 378 | "autoload": { 379 | "files": [ 380 | "src/lib/json_version.php" 381 | ], 382 | "psr-0": { 383 | "Herrera\\Json": "src/lib" 384 | } 385 | }, 386 | "notification-url": "https://packagist.org/downloads/", 387 | "license": [ 388 | "MIT" 389 | ], 390 | "authors": [ 391 | { 392 | "name": "Kevin Herrera", 393 | "email": "kevin@herrera.io", 394 | "homepage": "http://kevin.herrera.io" 395 | } 396 | ], 397 | "description": "A library for simplifying JSON linting and validation.", 398 | "homepage": "http://herrera-io.github.com/php-json", 399 | "keywords": [ 400 | "json", 401 | "lint", 402 | "schema", 403 | "validate" 404 | ], 405 | "abandoned": "kherge/json", 406 | "time": "2013-10-30T16:51:34+00:00" 407 | }, 408 | { 409 | "name": "herrera-io/phar-update", 410 | "version": "2.0.0", 411 | "source": { 412 | "type": "git", 413 | "url": "https://github.com/kherge-abandoned/php-phar-update.git", 414 | "reference": "15643c90d3d43620a4f45c910e6afb7a0ad4b488" 415 | }, 416 | "dist": { 417 | "type": "zip", 418 | "url": "https://api.github.com/repos/kherge-abandoned/php-phar-update/zipball/15643c90d3d43620a4f45c910e6afb7a0ad4b488", 419 | "reference": "15643c90d3d43620a4f45c910e6afb7a0ad4b488", 420 | "shasum": "" 421 | }, 422 | "require": { 423 | "herrera-io/json": "1.*", 424 | "herrera-io/version": "1.*", 425 | "php": ">=5.3.3" 426 | }, 427 | "require-dev": { 428 | "herrera-io/phpunit-test-case": "1.*", 429 | "mikey179/vfsstream": "1.1.0", 430 | "phpunit/phpunit": "3.7.*" 431 | }, 432 | "type": "library", 433 | "extra": { 434 | "branch-alias": { 435 | "dev-master": "2.0-dev" 436 | } 437 | }, 438 | "autoload": { 439 | "files": [ 440 | "src/lib/constants.php" 441 | ], 442 | "psr-0": { 443 | "Herrera\\Phar\\Update": "src/lib" 444 | } 445 | }, 446 | "notification-url": "https://packagist.org/downloads/", 447 | "license": [ 448 | "MIT" 449 | ], 450 | "authors": [ 451 | { 452 | "name": "Kevin Herrera", 453 | "email": "kevin@herrera.io", 454 | "homepage": "http://kevin.herrera.io" 455 | } 456 | ], 457 | "description": "A library for self-updating Phars.", 458 | "homepage": "http://herrera-io.github.com/php-phar-update", 459 | "keywords": [ 460 | "phar", 461 | "update" 462 | ], 463 | "abandoned": true, 464 | "time": "2013-11-09T17:13:13+00:00" 465 | }, 466 | { 467 | "name": "herrera-io/version", 468 | "version": "1.1.1", 469 | "source": { 470 | "type": "git", 471 | "url": "https://github.com/kherge-abandoned/php-version.git", 472 | "reference": "d39d9642b92a04d8b8a28b871b797a35a2545e85" 473 | }, 474 | "dist": { 475 | "type": "zip", 476 | "url": "https://api.github.com/repos/kherge-abandoned/php-version/zipball/d39d9642b92a04d8b8a28b871b797a35a2545e85", 477 | "reference": "d39d9642b92a04d8b8a28b871b797a35a2545e85", 478 | "shasum": "" 479 | }, 480 | "require": { 481 | "php": ">=5.3.3" 482 | }, 483 | "require-dev": { 484 | "herrera-io/phpunit-test-case": "1.*", 485 | "phpunit/phpunit": "3.7.*" 486 | }, 487 | "type": "library", 488 | "extra": { 489 | "branch-alias": { 490 | "dev-master": "1.1.x-dev" 491 | } 492 | }, 493 | "autoload": { 494 | "psr-0": { 495 | "Herrera\\Version": "src/lib" 496 | } 497 | }, 498 | "notification-url": "https://packagist.org/downloads/", 499 | "license": [ 500 | "MIT" 501 | ], 502 | "authors": [ 503 | { 504 | "name": "Kevin Herrera", 505 | "email": "kevin@herrera.io", 506 | "homepage": "http://kevin.herrera.io" 507 | } 508 | ], 509 | "description": "A library for creating, editing, and comparing semantic versioning numbers.", 510 | "homepage": "http://github.com/herrera-io/php-version", 511 | "keywords": [ 512 | "semantic", 513 | "version" 514 | ], 515 | "abandoned": true, 516 | "time": "2014-05-27T05:29:25+00:00" 517 | }, 518 | { 519 | "name": "justinrainbow/json-schema", 520 | "version": "1.6.1", 521 | "source": { 522 | "type": "git", 523 | "url": "https://github.com/justinrainbow/json-schema.git", 524 | "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341" 525 | }, 526 | "dist": { 527 | "type": "zip", 528 | "url": "https://api.github.com/repos/justinrainbow/json-schema/zipball/cc84765fb7317f6b07bd8ac78364747f95b86341", 529 | "reference": "cc84765fb7317f6b07bd8ac78364747f95b86341", 530 | "shasum": "" 531 | }, 532 | "require": { 533 | "php": ">=5.3.29" 534 | }, 535 | "require-dev": { 536 | "json-schema/json-schema-test-suite": "1.1.0", 537 | "phpdocumentor/phpdocumentor": "~2", 538 | "phpunit/phpunit": "~3.7" 539 | }, 540 | "bin": [ 541 | "bin/validate-json" 542 | ], 543 | "type": "library", 544 | "extra": { 545 | "branch-alias": { 546 | "dev-master": "1.6.x-dev" 547 | } 548 | }, 549 | "autoload": { 550 | "psr-4": { 551 | "JsonSchema\\": "src/JsonSchema/" 552 | } 553 | }, 554 | "notification-url": "https://packagist.org/downloads/", 555 | "license": [ 556 | "BSD-3-Clause" 557 | ], 558 | "authors": [ 559 | { 560 | "name": "Bruno Prieto Reis", 561 | "email": "bruno.p.reis@gmail.com" 562 | }, 563 | { 564 | "name": "Justin Rainbow", 565 | "email": "justin.rainbow@gmail.com" 566 | }, 567 | { 568 | "name": "Igor Wiedler", 569 | "email": "igor@wiedler.ch" 570 | }, 571 | { 572 | "name": "Robert Schönthal", 573 | "email": "seroscho@googlemail.com" 574 | } 575 | ], 576 | "description": "A library to validate a json schema.", 577 | "homepage": "https://github.com/justinrainbow/json-schema", 578 | "keywords": [ 579 | "json", 580 | "schema" 581 | ], 582 | "time": "2016-01-25T15:43:01+00:00" 583 | }, 584 | { 585 | "name": "kherge/amend", 586 | "version": "3.0.5", 587 | "source": { 588 | "type": "git", 589 | "url": "https://github.com/box-project/amend.git", 590 | "reference": "b241482d0e8c37d3d0fd2f6865f28cd98268cc56" 591 | }, 592 | "dist": { 593 | "type": "zip", 594 | "url": "https://api.github.com/repos/box-project/amend/zipball/b241482d0e8c37d3d0fd2f6865f28cd98268cc56", 595 | "reference": "b241482d0e8c37d3d0fd2f6865f28cd98268cc56", 596 | "shasum": "" 597 | }, 598 | "require": { 599 | "herrera-io/phar-update": "~2.0", 600 | "php": ">=5.3.3", 601 | "symfony/console": "^2.1|^3.0" 602 | }, 603 | "require-dev": { 604 | "herrera-io/box": "~1.0", 605 | "herrera-io/phpunit-test-case": "1.*", 606 | "phpunit/phpunit": "3.7.*" 607 | }, 608 | "type": "library", 609 | "extra": { 610 | "branch-alias": { 611 | "dev-master": "3.0-dev" 612 | } 613 | }, 614 | "autoload": { 615 | "psr-0": { 616 | "KevinGH\\Amend": "src/lib" 617 | } 618 | }, 619 | "notification-url": "https://packagist.org/downloads/", 620 | "license": [ 621 | "MIT" 622 | ], 623 | "authors": [ 624 | { 625 | "name": "Kevin Herrera", 626 | "email": "kevin@herrera.io", 627 | "homepage": "http://kevin.herrera.io" 628 | } 629 | ], 630 | "description": "Integrates Phar Update to Symfony Console.", 631 | "homepage": "http://github.com/box-project/amend", 632 | "keywords": [ 633 | "console", 634 | "phar", 635 | "update" 636 | ], 637 | "time": "2016-04-05T18:59:28+00:00" 638 | }, 639 | { 640 | "name": "kherge/box", 641 | "version": "2.7.5", 642 | "source": { 643 | "type": "git", 644 | "url": "https://github.com/box-project/box2.git", 645 | "reference": "8ce371cdc1f0005e087e9ca5c265b52b5f560fd4" 646 | }, 647 | "dist": { 648 | "type": "zip", 649 | "url": "https://api.github.com/repos/box-project/box2/zipball/8ce371cdc1f0005e087e9ca5c265b52b5f560fd4", 650 | "reference": "8ce371cdc1f0005e087e9ca5c265b52b5f560fd4", 651 | "shasum": "" 652 | }, 653 | "require": { 654 | "herrera-io/annotations": "~1.0", 655 | "herrera-io/box": "~1.6", 656 | "herrera-io/json": "~1.0", 657 | "justinrainbow/json-schema": "~1.3", 658 | "kherge/amend": "~3.0", 659 | "phine/path": "~1.0", 660 | "php": ">=5.3.3", 661 | "phpseclib/phpseclib": "~2.0", 662 | "symfony/console": "~2.1 || ~3.0", 663 | "symfony/finder": "~2.1 || ~3.0", 664 | "symfony/process": "~2.1 || ~3.0" 665 | }, 666 | "require-dev": { 667 | "herrera-io/phpunit-test-case": "1.*", 668 | "mikey179/vfsstream": "1.1.0", 669 | "phpunit/phpunit": "3.7.*" 670 | }, 671 | "suggest": { 672 | "ext-openssl": "To accelerate private key generation." 673 | }, 674 | "bin": [ 675 | "bin/box" 676 | ], 677 | "type": "library", 678 | "extra": { 679 | "branch-alias": { 680 | "dev-master": "2.x-dev" 681 | } 682 | }, 683 | "autoload": { 684 | "psr-0": { 685 | "KevinGH\\Box": "src/lib" 686 | } 687 | }, 688 | "notification-url": "https://packagist.org/downloads/", 689 | "license": [ 690 | "MIT" 691 | ], 692 | "authors": [ 693 | { 694 | "name": "Kevin Herrera", 695 | "email": "kevin@herrera.io", 696 | "homepage": "http://kevin.herrera.io" 697 | } 698 | ], 699 | "description": "A tool to simplify building PHARs.", 700 | "homepage": "http://box-project.github.io/box2/", 701 | "keywords": [ 702 | "phar" 703 | ], 704 | "time": "2016-12-11T21:30:06+00:00" 705 | }, 706 | { 707 | "name": "phine/exception", 708 | "version": "1.0.0", 709 | "source": { 710 | "type": "git", 711 | "url": "https://github.com/kherge-abandoned/lib-exception.git", 712 | "reference": "150c6b6090b2ebc53c60e87cb20c7f1287b7b68a" 713 | }, 714 | "dist": { 715 | "type": "zip", 716 | "url": "https://api.github.com/repos/kherge-abandoned/lib-exception/zipball/150c6b6090b2ebc53c60e87cb20c7f1287b7b68a", 717 | "reference": "150c6b6090b2ebc53c60e87cb20c7f1287b7b68a", 718 | "shasum": "" 719 | }, 720 | "require": { 721 | "php": ">=5.3.3" 722 | }, 723 | "require-dev": { 724 | "league/phpunit-coverage-listener": "~1.0" 725 | }, 726 | "type": "library", 727 | "extra": { 728 | "branch-alias": { 729 | "dev-master": "1.0-dev" 730 | } 731 | }, 732 | "autoload": { 733 | "psr-0": { 734 | "Phine\\Exception": "src/lib" 735 | } 736 | }, 737 | "notification-url": "https://packagist.org/downloads/", 738 | "license": [ 739 | "MIT" 740 | ], 741 | "authors": [ 742 | { 743 | "name": "Kevin Herrera", 744 | "email": "kevin@herrera.io", 745 | "homepage": "http://kevin.herrera.io" 746 | } 747 | ], 748 | "description": "A PHP library for improving the use of exceptions.", 749 | "homepage": "https://github.com/phine/lib-exception", 750 | "keywords": [ 751 | "exception" 752 | ], 753 | "abandoned": true, 754 | "time": "2013-08-27T17:43:25+00:00" 755 | }, 756 | { 757 | "name": "phine/path", 758 | "version": "1.1.0", 759 | "source": { 760 | "type": "git", 761 | "url": "https://github.com/box-project/box2-path.git", 762 | "reference": "cbe1a5eb6cf22958394db2469af9b773508abddd" 763 | }, 764 | "dist": { 765 | "type": "zip", 766 | "url": "https://api.github.com/repos/box-project/box2-path/zipball/cbe1a5eb6cf22958394db2469af9b773508abddd", 767 | "reference": "cbe1a5eb6cf22958394db2469af9b773508abddd", 768 | "shasum": "" 769 | }, 770 | "require": { 771 | "phine/exception": "~1.0", 772 | "php": ">=5.3.3" 773 | }, 774 | "require-dev": { 775 | "league/phpunit-coverage-listener": "~1.0" 776 | }, 777 | "type": "library", 778 | "extra": { 779 | "branch-alias": { 780 | "dev-master": "1.0-dev" 781 | } 782 | }, 783 | "autoload": { 784 | "psr-0": { 785 | "Phine\\Path": "src/lib" 786 | } 787 | }, 788 | "notification-url": "https://packagist.org/downloads/", 789 | "license": [ 790 | "MIT" 791 | ], 792 | "authors": [ 793 | { 794 | "name": "Kevin Herrera", 795 | "email": "kevin@herrera.io", 796 | "homepage": "http://kevin.herrera.io" 797 | } 798 | ], 799 | "description": "A PHP library for improving the use of file system paths.", 800 | "homepage": "https://github.com/phine/lib-path", 801 | "keywords": [ 802 | "file", 803 | "path", 804 | "system" 805 | ], 806 | "abandoned": true, 807 | "time": "2013-10-15T22:58:04+00:00" 808 | }, 809 | { 810 | "name": "phpseclib/phpseclib", 811 | "version": "2.0.4", 812 | "source": { 813 | "type": "git", 814 | "url": "https://github.com/phpseclib/phpseclib.git", 815 | "reference": "ab8028c93c03cc8d9c824efa75dc94f1db2369bf" 816 | }, 817 | "dist": { 818 | "type": "zip", 819 | "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/ab8028c93c03cc8d9c824efa75dc94f1db2369bf", 820 | "reference": "ab8028c93c03cc8d9c824efa75dc94f1db2369bf", 821 | "shasum": "" 822 | }, 823 | "require": { 824 | "php": ">=5.3.3" 825 | }, 826 | "require-dev": { 827 | "phing/phing": "~2.7", 828 | "phpunit/phpunit": "~4.0", 829 | "sami/sami": "~2.0", 830 | "squizlabs/php_codesniffer": "~2.0" 831 | }, 832 | "suggest": { 833 | "ext-gmp": "Install the GMP (GNU Multiple Precision) extension in order to speed up arbitrary precision integer arithmetic operations.", 834 | "ext-libsodium": "SSH2/SFTP can make use of some algorithms provided by the libsodium-php extension.", 835 | "ext-mcrypt": "Install the Mcrypt extension in order to speed up a few other cryptographic operations.", 836 | "ext-openssl": "Install the OpenSSL extension in order to speed up a wide variety of cryptographic operations." 837 | }, 838 | "type": "library", 839 | "autoload": { 840 | "files": [ 841 | "phpseclib/bootstrap.php" 842 | ], 843 | "psr-4": { 844 | "phpseclib\\": "phpseclib/" 845 | } 846 | }, 847 | "notification-url": "https://packagist.org/downloads/", 848 | "license": [ 849 | "MIT" 850 | ], 851 | "authors": [ 852 | { 853 | "name": "Jim Wigginton", 854 | "email": "terrafrost@php.net", 855 | "role": "Lead Developer" 856 | }, 857 | { 858 | "name": "Patrick Monnerat", 859 | "email": "pm@datasphere.ch", 860 | "role": "Developer" 861 | }, 862 | { 863 | "name": "Andreas Fischer", 864 | "email": "bantu@phpbb.com", 865 | "role": "Developer" 866 | }, 867 | { 868 | "name": "Hans-Jürgen Petrich", 869 | "email": "petrich@tronic-media.com", 870 | "role": "Developer" 871 | }, 872 | { 873 | "name": "Graham Campbell", 874 | "email": "graham@alt-three.com", 875 | "role": "Developer" 876 | } 877 | ], 878 | "description": "PHP Secure Communications Library - Pure-PHP implementations of RSA, AES, SSH2, SFTP, X.509 etc.", 879 | "homepage": "http://phpseclib.sourceforge.net", 880 | "keywords": [ 881 | "BigInteger", 882 | "aes", 883 | "asn.1", 884 | "asn1", 885 | "blowfish", 886 | "crypto", 887 | "cryptography", 888 | "encryption", 889 | "rsa", 890 | "security", 891 | "sftp", 892 | "signature", 893 | "signing", 894 | "ssh", 895 | "twofish", 896 | "x.509", 897 | "x509" 898 | ], 899 | "time": "2016-10-04T00:57:04+00:00" 900 | }, 901 | { 902 | "name": "psr/log", 903 | "version": "1.0.2", 904 | "source": { 905 | "type": "git", 906 | "url": "https://github.com/php-fig/log.git", 907 | "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" 908 | }, 909 | "dist": { 910 | "type": "zip", 911 | "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", 912 | "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", 913 | "shasum": "" 914 | }, 915 | "require": { 916 | "php": ">=5.3.0" 917 | }, 918 | "type": "library", 919 | "extra": { 920 | "branch-alias": { 921 | "dev-master": "1.0.x-dev" 922 | } 923 | }, 924 | "autoload": { 925 | "psr-4": { 926 | "Psr\\Log\\": "Psr/Log/" 927 | } 928 | }, 929 | "notification-url": "https://packagist.org/downloads/", 930 | "license": [ 931 | "MIT" 932 | ], 933 | "authors": [ 934 | { 935 | "name": "PHP-FIG", 936 | "homepage": "http://www.php-fig.org/" 937 | } 938 | ], 939 | "description": "Common interface for logging libraries", 940 | "homepage": "https://github.com/php-fig/log", 941 | "keywords": [ 942 | "log", 943 | "psr", 944 | "psr-3" 945 | ], 946 | "time": "2016-10-10T12:19:37+00:00" 947 | }, 948 | { 949 | "name": "seld/jsonlint", 950 | "version": "1.5.0", 951 | "source": { 952 | "type": "git", 953 | "url": "https://github.com/Seldaek/jsonlint.git", 954 | "reference": "19495c181d6d53a0a13414154e52817e3b504189" 955 | }, 956 | "dist": { 957 | "type": "zip", 958 | "url": "https://api.github.com/repos/Seldaek/jsonlint/zipball/19495c181d6d53a0a13414154e52817e3b504189", 959 | "reference": "19495c181d6d53a0a13414154e52817e3b504189", 960 | "shasum": "" 961 | }, 962 | "require": { 963 | "php": "^5.3 || ^7.0" 964 | }, 965 | "bin": [ 966 | "bin/jsonlint" 967 | ], 968 | "type": "library", 969 | "autoload": { 970 | "psr-4": { 971 | "Seld\\JsonLint\\": "src/Seld/JsonLint/" 972 | } 973 | }, 974 | "notification-url": "https://packagist.org/downloads/", 975 | "license": [ 976 | "MIT" 977 | ], 978 | "authors": [ 979 | { 980 | "name": "Jordi Boggiano", 981 | "email": "j.boggiano@seld.be", 982 | "homepage": "http://seld.be" 983 | } 984 | ], 985 | "description": "JSON Linter", 986 | "keywords": [ 987 | "json", 988 | "linter", 989 | "parser", 990 | "validator" 991 | ], 992 | "time": "2016-11-14T17:59:58+00:00" 993 | }, 994 | { 995 | "name": "symfony/console", 996 | "version": "v3.2.2", 997 | "source": { 998 | "type": "git", 999 | "url": "https://github.com/symfony/console.git", 1000 | "reference": "4f9e449e76996adf310498a8ca955c6deebe29dd" 1001 | }, 1002 | "dist": { 1003 | "type": "zip", 1004 | "url": "https://api.github.com/repos/symfony/console/zipball/4f9e449e76996adf310498a8ca955c6deebe29dd", 1005 | "reference": "4f9e449e76996adf310498a8ca955c6deebe29dd", 1006 | "shasum": "" 1007 | }, 1008 | "require": { 1009 | "php": ">=5.5.9", 1010 | "symfony/debug": "~2.8|~3.0", 1011 | "symfony/polyfill-mbstring": "~1.0" 1012 | }, 1013 | "require-dev": { 1014 | "psr/log": "~1.0", 1015 | "symfony/event-dispatcher": "~2.8|~3.0", 1016 | "symfony/filesystem": "~2.8|~3.0", 1017 | "symfony/process": "~2.8|~3.0" 1018 | }, 1019 | "suggest": { 1020 | "psr/log": "For using the console logger", 1021 | "symfony/event-dispatcher": "", 1022 | "symfony/filesystem": "", 1023 | "symfony/process": "" 1024 | }, 1025 | "type": "library", 1026 | "extra": { 1027 | "branch-alias": { 1028 | "dev-master": "3.2-dev" 1029 | } 1030 | }, 1031 | "autoload": { 1032 | "psr-4": { 1033 | "Symfony\\Component\\Console\\": "" 1034 | }, 1035 | "exclude-from-classmap": [ 1036 | "/Tests/" 1037 | ] 1038 | }, 1039 | "notification-url": "https://packagist.org/downloads/", 1040 | "license": [ 1041 | "MIT" 1042 | ], 1043 | "authors": [ 1044 | { 1045 | "name": "Fabien Potencier", 1046 | "email": "fabien@symfony.com" 1047 | }, 1048 | { 1049 | "name": "Symfony Community", 1050 | "homepage": "https://symfony.com/contributors" 1051 | } 1052 | ], 1053 | "description": "Symfony Console Component", 1054 | "homepage": "https://symfony.com", 1055 | "time": "2017-01-08T20:47:33+00:00" 1056 | }, 1057 | { 1058 | "name": "symfony/debug", 1059 | "version": "v3.2.2", 1060 | "source": { 1061 | "type": "git", 1062 | "url": "https://github.com/symfony/debug.git", 1063 | "reference": "810ba5c1c5352a4ddb15d4719e8936751dff0b05" 1064 | }, 1065 | "dist": { 1066 | "type": "zip", 1067 | "url": "https://api.github.com/repos/symfony/debug/zipball/810ba5c1c5352a4ddb15d4719e8936751dff0b05", 1068 | "reference": "810ba5c1c5352a4ddb15d4719e8936751dff0b05", 1069 | "shasum": "" 1070 | }, 1071 | "require": { 1072 | "php": ">=5.5.9", 1073 | "psr/log": "~1.0" 1074 | }, 1075 | "conflict": { 1076 | "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" 1077 | }, 1078 | "require-dev": { 1079 | "symfony/class-loader": "~2.8|~3.0", 1080 | "symfony/http-kernel": "~2.8|~3.0" 1081 | }, 1082 | "type": "library", 1083 | "extra": { 1084 | "branch-alias": { 1085 | "dev-master": "3.2-dev" 1086 | } 1087 | }, 1088 | "autoload": { 1089 | "psr-4": { 1090 | "Symfony\\Component\\Debug\\": "" 1091 | }, 1092 | "exclude-from-classmap": [ 1093 | "/Tests/" 1094 | ] 1095 | }, 1096 | "notification-url": "https://packagist.org/downloads/", 1097 | "license": [ 1098 | "MIT" 1099 | ], 1100 | "authors": [ 1101 | { 1102 | "name": "Fabien Potencier", 1103 | "email": "fabien@symfony.com" 1104 | }, 1105 | { 1106 | "name": "Symfony Community", 1107 | "homepage": "https://symfony.com/contributors" 1108 | } 1109 | ], 1110 | "description": "Symfony Debug Component", 1111 | "homepage": "https://symfony.com", 1112 | "time": "2017-01-02T20:32:22+00:00" 1113 | }, 1114 | { 1115 | "name": "symfony/finder", 1116 | "version": "v3.2.2", 1117 | "source": { 1118 | "type": "git", 1119 | "url": "https://github.com/symfony/finder.git", 1120 | "reference": "8c71141cae8e2957946b403cc71a67213c0380d6" 1121 | }, 1122 | "dist": { 1123 | "type": "zip", 1124 | "url": "https://api.github.com/repos/symfony/finder/zipball/8c71141cae8e2957946b403cc71a67213c0380d6", 1125 | "reference": "8c71141cae8e2957946b403cc71a67213c0380d6", 1126 | "shasum": "" 1127 | }, 1128 | "require": { 1129 | "php": ">=5.5.9" 1130 | }, 1131 | "type": "library", 1132 | "extra": { 1133 | "branch-alias": { 1134 | "dev-master": "3.2-dev" 1135 | } 1136 | }, 1137 | "autoload": { 1138 | "psr-4": { 1139 | "Symfony\\Component\\Finder\\": "" 1140 | }, 1141 | "exclude-from-classmap": [ 1142 | "/Tests/" 1143 | ] 1144 | }, 1145 | "notification-url": "https://packagist.org/downloads/", 1146 | "license": [ 1147 | "MIT" 1148 | ], 1149 | "authors": [ 1150 | { 1151 | "name": "Fabien Potencier", 1152 | "email": "fabien@symfony.com" 1153 | }, 1154 | { 1155 | "name": "Symfony Community", 1156 | "homepage": "https://symfony.com/contributors" 1157 | } 1158 | ], 1159 | "description": "Symfony Finder Component", 1160 | "homepage": "https://symfony.com", 1161 | "time": "2017-01-02T20:32:22+00:00" 1162 | }, 1163 | { 1164 | "name": "symfony/polyfill-mbstring", 1165 | "version": "v1.3.0", 1166 | "source": { 1167 | "type": "git", 1168 | "url": "https://github.com/symfony/polyfill-mbstring.git", 1169 | "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" 1170 | }, 1171 | "dist": { 1172 | "type": "zip", 1173 | "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", 1174 | "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", 1175 | "shasum": "" 1176 | }, 1177 | "require": { 1178 | "php": ">=5.3.3" 1179 | }, 1180 | "suggest": { 1181 | "ext-mbstring": "For best performance" 1182 | }, 1183 | "type": "library", 1184 | "extra": { 1185 | "branch-alias": { 1186 | "dev-master": "1.3-dev" 1187 | } 1188 | }, 1189 | "autoload": { 1190 | "psr-4": { 1191 | "Symfony\\Polyfill\\Mbstring\\": "" 1192 | }, 1193 | "files": [ 1194 | "bootstrap.php" 1195 | ] 1196 | }, 1197 | "notification-url": "https://packagist.org/downloads/", 1198 | "license": [ 1199 | "MIT" 1200 | ], 1201 | "authors": [ 1202 | { 1203 | "name": "Nicolas Grekas", 1204 | "email": "p@tchwork.com" 1205 | }, 1206 | { 1207 | "name": "Symfony Community", 1208 | "homepage": "https://symfony.com/contributors" 1209 | } 1210 | ], 1211 | "description": "Symfony polyfill for the Mbstring extension", 1212 | "homepage": "https://symfony.com", 1213 | "keywords": [ 1214 | "compatibility", 1215 | "mbstring", 1216 | "polyfill", 1217 | "portable", 1218 | "shim" 1219 | ], 1220 | "time": "2016-11-14T01:06:16+00:00" 1221 | }, 1222 | { 1223 | "name": "tedivm/jshrink", 1224 | "version": "v1.1.0", 1225 | "source": { 1226 | "type": "git", 1227 | "url": "https://github.com/tedious/JShrink.git", 1228 | "reference": "688527a2e854d7935f24f24c7d5eb1b604742bf9" 1229 | }, 1230 | "dist": { 1231 | "type": "zip", 1232 | "url": "https://api.github.com/repos/tedious/JShrink/zipball/688527a2e854d7935f24f24c7d5eb1b604742bf9", 1233 | "reference": "688527a2e854d7935f24f24c7d5eb1b604742bf9", 1234 | "shasum": "" 1235 | }, 1236 | "require": { 1237 | "php": ">=5.3.0" 1238 | }, 1239 | "require-dev": { 1240 | "fabpot/php-cs-fixer": "0.4.0", 1241 | "phpunit/phpunit": "4.0.*", 1242 | "satooshi/php-coveralls": "dev-master" 1243 | }, 1244 | "type": "library", 1245 | "autoload": { 1246 | "psr-0": { 1247 | "JShrink": "src/" 1248 | } 1249 | }, 1250 | "notification-url": "https://packagist.org/downloads/", 1251 | "license": [ 1252 | "BSD-3-Clause" 1253 | ], 1254 | "authors": [ 1255 | { 1256 | "name": "Robert Hafner", 1257 | "email": "tedivm@tedivm.com" 1258 | } 1259 | ], 1260 | "description": "Javascript Minifier built in PHP", 1261 | "homepage": "http://github.com/tedious/JShrink", 1262 | "keywords": [ 1263 | "javascript", 1264 | "minifier" 1265 | ], 1266 | "time": "2015-07-04T07:35:09+00:00" 1267 | } 1268 | ], 1269 | "aliases": [], 1270 | "minimum-stability": "stable", 1271 | "stability-flags": [], 1272 | "prefer-stable": false, 1273 | "prefer-lowest": false, 1274 | "platform": [], 1275 | "platform-dev": [] 1276 | } 1277 | -------------------------------------------------------------------------------- /doc/example-git-diff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agallou/git-php-diff/c3e654b1166237eb01c67954dc662e9747f9e167/doc/example-git-diff.png -------------------------------------------------------------------------------- /doc/example-git-php-diff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agallou/git-php-diff/c3e654b1166237eb01c67954dc662e9747f9e167/doc/example-git-php-diff.png --------------------------------------------------------------------------------