diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 7556173..af32879 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -17,14 +17,14 @@ concurrency: jobs: cs: - uses: phpalto/.github/.github/workflows/CS.yml@main + uses: altophp/.github/.github/workflows/CS.yml@main # with: # php-version: '8.5' # composer-validate: true # php-cs-fixer-args: '--diff --dry-run' sa: - uses: phpalto/.github/.github/workflows/SA.yml@main + uses: altophp/.github/.github/workflows/SA.yml@main # with: # php-version: '8.5' # phpstan-args: 'analyse --no-progress --memory-limit=-1' @@ -34,7 +34,7 @@ jobs: fail-fast: false matrix: php: ['8.3', '8.4', '8.5'] - uses: phpalto/.github/.github/workflows/tests.yml@main + uses: altophp/.github/.github/workflows/tests.yml@main with: php-version: ${{ matrix.php }} # phpunit-args: '--colors=never' diff --git a/README.md b/README.md index 29ccb6e..fedaca9 100644 --- a/README.md +++ b/README.md @@ -9,12 +9,12 @@ Built for systems where change history matters. --- -  [![PHP Version](https://img.shields.io/badge/PHP-8.3+-ffefdf?logoColor=white&labelColor=000)](https://github.com/PhpAlto/json-patch) -  [![CI](https://img.shields.io/github/actions/workflow/status/PhpAlto/json-patch/CI.yml?branch=main&label=Tests&logoColor=white&logoSize=auto&labelColor=000&color=ffefdf)](https://github.com/PhpAlto/json-patch/actions) +  [![PHP Version](https://img.shields.io/badge/PHP-8.3+-ffefdf?logoColor=white&labelColor=000)](https://github.com/altophp/json-patch) +  [![CI](https://img.shields.io/github/actions/workflow/status/altophp/json-patch/CI.yml?branch=main&label=Tests&logoColor=white&logoSize=auto&labelColor=000&color=ffefdf)](https://github.com/altophp/json-patch/actions)   [![Packagist Version](https://img.shields.io/packagist/v/alto/json-patch?label=Stable&logoColor=white&logoSize=auto&labelColor=000&color=ffefdf)](https://packagist.org/packages/alto/json-patch) -  [![PHP Version](https://img.shields.io/badge/PHPUnit-100%25-ffefdf?logoColor=white&labelColor=000)](https://github.com/PhpAlto/json-patch) -  [![PHP Version](https://img.shields.io/badge/PHPStan-LVL%2010-ffefdf?logoColor=white&labelColor=000)](https://github.com/PhpAlto/json-patch) -  [![License](https://img.shields.io/github/license/PhpAlto/json-patch?label=License&logoColor=white&logoSize=auto&labelColor=000&color=ffefdf)](./LICENSE) +  [![PHP Version](https://img.shields.io/badge/PHPUnit-100%25-ffefdf?logoColor=white&labelColor=000)](https://github.com/altophp/json-patch) +  [![PHP Version](https://img.shields.io/badge/PHPStan-LVL%2010-ffefdf?logoColor=white&labelColor=000)](https://github.com/altophp/json-patch) +  [![License](https://img.shields.io/github/license/altophp/json-patch?label=License&logoColor=white&logoSize=auto&labelColor=000&color=ffefdf)](./LICENSE) * **Pure PHP**: Tiny surface area, no heavy dependencies. * **Strict Types**: Built for PHP 8.3+ with strict typing. diff --git a/composer.json b/composer.json index 8a7e9e7..8bcb899 100644 --- a/composer.json +++ b/composer.json @@ -21,10 +21,10 @@ "email": "smn.andre@gmail.com" } ], - "homepage": "https://github.com/phpalto/json-patch", + "homepage": "https://github.com/altophp/json-patch", "support": { - "issues": "https://github.com/phpalto/json-patch/issues", - "docs": "https://github.com/phpalto/json-patch#readme" + "issues": "https://github.com/altophp/json-patch/issues", + "docs": "https://github.com/altophp/json-patch#readme" }, "funding": [ { diff --git a/src/JsonPatch.php b/src/JsonPatch.php index afd09fc..055b1d2 100644 --- a/src/JsonPatch.php +++ b/src/JsonPatch.php @@ -790,7 +790,7 @@ private static function diffListByLcs(string $path, array $from, array $to, arra // Element in $to but not in LCS - need to add $addOps[] = ['index' => $j - 1, 'value' => $to[$j - 1]]; --$j; - } elseif ($i > 0 && (0 === $j || $lcs[$i][$j - 1] < $lcs[$i - 1][$j])) { + } elseif (0 === $j || $lcs[$i][$j - 1] < $lcs[$i - 1][$j]) { // Element in $from but not in LCS - need to remove $removeOps[] = ['index' => $i - 1]; --$i;