diff --git a/.github/workflows/discord-release-notify.yml b/.github/workflows/discord-release-notify.yml index 6081b8fd8..f02f04712 100644 --- a/.github/workflows/discord-release-notify.yml +++ b/.github/workflows/discord-release-notify.yml @@ -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 diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 62fa41332..77467fad2 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -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 diff --git a/.github/workflows/main-php-matrix.yml b/.github/workflows/main-php-matrix.yml index 3bc0bdebf..110f8d0ed 100644 --- a/.github/workflows/main-php-matrix.yml +++ b/.github/workflows/main-php-matrix.yml @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bcb8036d9..ecadf8af3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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 diff --git a/composer.json b/composer.json index 953f06931..728478e48 100644 --- a/composer.json +++ b/composer.json @@ -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" diff --git a/composer.lock b/composer.lock index 0a2539521..a668d5aad 100644 --- a/composer.lock +++ b/composer.lock @@ -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", diff --git a/tools/generate-bedrock-data-from-packets.php b/tools/generate-bedrock-data-from-packets.php index 7316b3f86..77d2b9d93 100644 --- a/tools/generate-bedrock-data-from-packets.php +++ b/tools/generate-bedrock-data-from-packets.php @@ -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; } diff --git a/tools/generate-item-upgrade-schema.php b/tools/generate-item-upgrade-schema.php index c6096bafb..4eee92539 100644 --- a/tools/generate-item-upgrade-schema.php +++ b/tools/generate-item-upgrade-schema.php @@ -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);