Merge remote-tracking branch 'origin/stable' into minor-next

This commit is contained in:
Dylan K. Taylor 2024-02-05 12:43:39 +00:00
commit 20837c9894
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
8 changed files with 24 additions and 19 deletions

View File

@ -13,12 +13,12 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Setup PHP and tools - name: Setup PHP and tools
uses: shivammathur/setup-php@2.28.0 uses: shivammathur/setup-php@2.29.0
with: with:
php-version: 8.2 php-version: 8.2
- name: Restore Composer package cache - name: Restore Composer package cache
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: | path: |
~/.cache/composer/files ~/.cache/composer/files

View File

@ -20,12 +20,12 @@ jobs:
submodules: true submodules: true
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@2.28.0 uses: shivammathur/setup-php@2.29.0
with: with:
php-version: ${{ matrix.php-version }} php-version: ${{ matrix.php-version }}
- name: Restore Composer package cache - name: Restore Composer package cache
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: | path: |
~/.cache/composer/files ~/.cache/composer/files

View File

@ -37,7 +37,7 @@ jobs:
pm-version-major: ${{ inputs.pm-version-major }} pm-version-major: ${{ inputs.pm-version-major }}
- name: Restore Composer package cache - name: Restore Composer package cache
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: | path: |
~/.cache/composer/files ~/.cache/composer/files
@ -69,7 +69,7 @@ jobs:
pm-version-major: ${{ inputs.pm-version-major }} pm-version-major: ${{ inputs.pm-version-major }}
- name: Restore Composer package cache - name: Restore Composer package cache
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: | path: |
~/.cache/composer/files ~/.cache/composer/files
@ -103,7 +103,7 @@ jobs:
pm-version-major: ${{ inputs.pm-version-major }} pm-version-major: ${{ inputs.pm-version-major }}
- name: Restore Composer package cache - name: Restore Composer package cache
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: | path: |
~/.cache/composer/files ~/.cache/composer/files
@ -135,7 +135,7 @@ jobs:
pm-version-major: ${{ inputs.pm-version-major }} pm-version-major: ${{ inputs.pm-version-major }}
- name: Restore Composer package cache - name: Restore Composer package cache
uses: actions/cache@v3 uses: actions/cache@v4
with: with:
path: | path: |
~/.cache/composer/files ~/.cache/composer/files

View File

@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Setup PHP and tools - name: Setup PHP and tools
uses: shivammathur/setup-php@2.28.0 uses: shivammathur/setup-php@2.29.0
with: with:
php-version: 8.2 php-version: 8.2
tools: php-cs-fixer:3.38 tools: php-cs-fixer:3.38

View File

@ -52,7 +52,7 @@
"symfony/filesystem": "~6.4.0" "symfony/filesystem": "~6.4.0"
}, },
"require-dev": { "require-dev": {
"phpstan/phpstan": "1.10.55", "phpstan/phpstan": "1.10.57",
"phpstan/phpstan-phpunit": "^1.1.0", "phpstan/phpstan-phpunit": "^1.1.0",
"phpstan/phpstan-strict-rules": "^1.2.0", "phpstan/phpstan-strict-rules": "^1.2.0",
"phpunit/phpunit": "~10.3.0 || ~10.2.0 || ~10.1.0" "phpunit/phpunit": "~10.3.0 || ~10.2.0 || ~10.1.0"

12
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "d7a3fceea557add1b8cb461554db1ee7", "content-hash": "fecd5b7c364cb3a0f3a832004f594101",
"packages": [ "packages": [
{ {
"name": "adhocore/json-comment", "name": "adhocore/json-comment",
@ -1380,16 +1380,16 @@
}, },
{ {
"name": "phpstan/phpstan", "name": "phpstan/phpstan",
"version": "1.10.55", "version": "1.10.57",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpstan.git", "url": "https://github.com/phpstan/phpstan.git",
"reference": "9a88f9d18ddf4cf54c922fbeac16c4cb164c5949" "reference": "1627b1d03446904aaa77593f370c5201d2ecc34e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/9a88f9d18ddf4cf54c922fbeac16c4cb164c5949", "url": "https://api.github.com/repos/phpstan/phpstan/zipball/1627b1d03446904aaa77593f370c5201d2ecc34e",
"reference": "9a88f9d18ddf4cf54c922fbeac16c4cb164c5949", "reference": "1627b1d03446904aaa77593f370c5201d2ecc34e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1438,7 +1438,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2024-01-08T12:32:40+00:00" "time": "2024-01-24T11:51:34+00:00"
}, },
{ {
"name": "phpstan/phpstan-phpunit", "name": "phpstan/phpstan-phpunit",

View File

@ -165,7 +165,7 @@ class ParserPacketHandler extends PacketHandler{
$data->block_states = self::blockStatePropertiesToString($blockState); $data->block_states = self::blockStatePropertiesToString($blockState);
} }
}elseif($itemStack->getBlockRuntimeId() !== ItemTranslator::NO_BLOCK_RUNTIME_ID){ }elseif($itemStack->getBlockRuntimeId() !== ItemTranslator::NO_BLOCK_RUNTIME_ID){
throw new PacketHandlingException("Non-blockitems should have a zero block runtime ID"); throw new PacketHandlingException("Non-blockitems should have a zero block runtime ID (" . $itemStack->getBlockRuntimeId() . " on " . $itemStringId . ")");
}elseif($meta !== 0){ }elseif($meta !== 0){
$data->meta = $meta; $data->meta = $meta;
} }

View File

@ -94,9 +94,14 @@ foreach($files as $file){
$newDiff = []; $newDiff = [];
foreach($target["simple"] as $oldId => $newId){ foreach($target["simple"] as $oldId => $newId){
if(($merged["simple"][$oldId] ?? null) !== $newId){ $previousNewId = $merged["simple"][$oldId] ?? null;
$newDiff["renamedIds"][$oldId] = $newId; if(
$previousNewId === $newId || //if previous schemas already accounted for this
($previousNewId !== null && isset($target["simple"][$previousNewId])) //or the item's ID has been changed for a second time
){
continue;
} }
$newDiff["renamedIds"][$oldId] = $newId;
} }
if(isset($newDiff["renamedIds"])){ if(isset($newDiff["renamedIds"])){
ksort($newDiff["renamedIds"], SORT_STRING); ksort($newDiff["renamedIds"], SORT_STRING);