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
- name: Setup PHP and tools
uses: shivammathur/setup-php@2.28.0
uses: shivammathur/setup-php@2.29.0
with:
php-version: 8.2
- name: Restore Composer package cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cache/composer/files

View File

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

View File

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

View File

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

View File

@ -52,7 +52,7 @@
"symfony/filesystem": "~6.4.0"
},
"require-dev": {
"phpstan/phpstan": "1.10.55",
"phpstan/phpstan": "1.10.57",
"phpstan/phpstan-phpunit": "^1.1.0",
"phpstan/phpstan-strict-rules": "^1.2.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",
"This file is @generated automatically"
],
"content-hash": "d7a3fceea557add1b8cb461554db1ee7",
"content-hash": "fecd5b7c364cb3a0f3a832004f594101",
"packages": [
{
"name": "adhocore/json-comment",
@ -1380,16 +1380,16 @@
},
{
"name": "phpstan/phpstan",
"version": "1.10.55",
"version": "1.10.57",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "9a88f9d18ddf4cf54c922fbeac16c4cb164c5949"
"reference": "1627b1d03446904aaa77593f370c5201d2ecc34e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/9a88f9d18ddf4cf54c922fbeac16c4cb164c5949",
"reference": "9a88f9d18ddf4cf54c922fbeac16c4cb164c5949",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/1627b1d03446904aaa77593f370c5201d2ecc34e",
"reference": "1627b1d03446904aaa77593f370c5201d2ecc34e",
"shasum": ""
},
"require": {
@ -1438,7 +1438,7 @@
"type": "tidelift"
}
],
"time": "2024-01-08T12:32:40+00:00"
"time": "2024-01-24T11:51:34+00:00"
},
{
"name": "phpstan/phpstan-phpunit",

View File

@ -165,7 +165,7 @@ class ParserPacketHandler extends PacketHandler{
$data->block_states = self::blockStatePropertiesToString($blockState);
}
}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){
$data->meta = $meta;
}

View File

@ -94,9 +94,14 @@ foreach($files as $file){
$newDiff = [];
foreach($target["simple"] as $oldId => $newId){
if(($merged["simple"][$oldId] ?? null) !== $newId){
$newDiff["renamedIds"][$oldId] = $newId;
$previousNewId = $merged["simple"][$oldId] ?? null;
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"])){
ksort($newDiff["renamedIds"], SORT_STRING);