diff --git a/build/php b/build/php index 27cc1fcdf..6b605ed7c 160000 --- a/build/php +++ b/build/php @@ -1 +1 @@ -Subproject commit 27cc1fcdfa54b11c83d5d9056d189d080e5a7786 +Subproject commit 6b605ed7c458fc8f95080ffe41a7f248a7160107 diff --git a/changelogs/4.12.md b/changelogs/4.12.md index efd53e528..eaf4c8d25 100644 --- a/changelogs/4.12.md +++ b/changelogs/4.12.md @@ -18,3 +18,15 @@ Released 4th December 2022. ## Fixes - Fixed items glitching when dragging a stack of items across the crafting grid (desync issues). + +# 4.12.2 +Released 15th December 2022. + +## Fixes +- Folder used for plugins (optionally specified by `--plugins`) is no longer required to be writable. +- Fixed broken writable check for server data folder (`is_writable()` broken on NFS and similar filesystems). +- `Filesystem::createLockFile()` exceptions now include more information about why the lock file could not be created. +- Fixed client-side item predictions not being rolled back when cancelling events such as `PlayerItemUseEvent`. + +## Dependencies +- Updated BedrockProtocol to [17.1.0](https://github.com/pmmp/BedrockProtocol/releases/tag/17.1.0+bedrock-1.19.50). This adds some missing `LevelSoundEvent` constants and fixes the values for `ContainerUIIds`. diff --git a/composer.json b/composer.json index 444568035..ad19b71aa 100644 --- a/composer.json +++ b/composer.json @@ -55,7 +55,7 @@ "symfony/filesystem": "^5.4" }, "require-dev": { - "phpstan/phpstan": "1.9.2", + "phpstan/phpstan": "1.9.4", "phpstan/phpstan-phpunit": "^1.1.0", "phpstan/phpstan-strict-rules": "^1.2.0", "phpunit/phpunit": "^9.2" diff --git a/composer.lock b/composer.lock index 4f66fc6ee..b91c8901b 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": "614023b483badb5ec8720775dd2d3d12", + "content-hash": "2d4da4bb4787764fbe706a04311c3cbf", "packages": [ { "name": "adhocore/json-comment", @@ -123,24 +123,24 @@ }, { "name": "fgrosse/phpasn1", - "version": "v2.4.0", + "version": "v2.5.0", "source": { "type": "git", "url": "https://github.com/fgrosse/PHPASN1.git", - "reference": "eef488991d53e58e60c9554b09b1201ca5ba9296" + "reference": "42060ed45344789fb9f21f9f1864fc47b9e3507b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/eef488991d53e58e60c9554b09b1201ca5ba9296", - "reference": "eef488991d53e58e60c9554b09b1201ca5ba9296", + "url": "https://api.github.com/repos/fgrosse/PHPASN1/zipball/42060ed45344789fb9f21f9f1864fc47b9e3507b", + "reference": "42060ed45344789fb9f21f9f1864fc47b9e3507b", "shasum": "" }, "require": { - "php": "~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0" + "php": "^7.1 || ^8.0" }, "require-dev": { "php-coveralls/php-coveralls": "~2.0", - "phpunit/phpunit": "^6.3 || ^7.0 || ^8.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "suggest": { "ext-bcmath": "BCmath is the fallback extension for big integer calculations", @@ -192,9 +192,10 @@ ], "support": { "issues": "https://github.com/fgrosse/PHPASN1/issues", - "source": "https://github.com/fgrosse/PHPASN1/tree/v2.4.0" + "source": "https://github.com/fgrosse/PHPASN1/tree/v2.5.0" }, - "time": "2021-12-11T12:41:06+00:00" + "abandoned": true, + "time": "2022-12-19T11:08:26+00:00" }, { "name": "netresearch/jsonmapper", @@ -1765,16 +1766,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.9.2", + "version": "1.9.4", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "d6fdf01c53978b6429f1393ba4afeca39cc68afa" + "reference": "d03bccee595e2146b7c9d174486b84f4dc61b0f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d6fdf01c53978b6429f1393ba4afeca39cc68afa", - "reference": "d6fdf01c53978b6429f1393ba4afeca39cc68afa", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/d03bccee595e2146b7c9d174486b84f4dc61b0f2", + "reference": "d03bccee595e2146b7c9d174486b84f4dc61b0f2", "shasum": "" }, "require": { @@ -1804,7 +1805,7 @@ ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.9.2" + "source": "https://github.com/phpstan/phpstan/tree/1.9.4" }, "funding": [ { @@ -1820,25 +1821,25 @@ "type": "tidelift" } ], - "time": "2022-11-10T09:56:11+00:00" + "time": "2022-12-17T13:33:52+00:00" }, { "name": "phpstan/phpstan-phpunit", - "version": "1.3.0", + "version": "1.3.2", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan-phpunit.git", - "reference": "4c06b7e3f2c40081334d86975350dda814bd064a" + "reference": "cd9c6938f8bbfcb6da3ed5a3c7ea60873825d088" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/4c06b7e3f2c40081334d86975350dda814bd064a", - "reference": "4c06b7e3f2c40081334d86975350dda814bd064a", + "url": "https://api.github.com/repos/phpstan/phpstan-phpunit/zipball/cd9c6938f8bbfcb6da3ed5a3c7ea60873825d088", + "reference": "cd9c6938f8bbfcb6da3ed5a3c7ea60873825d088", "shasum": "" }, "require": { "php": "^7.2 || ^8.0", - "phpstan/phpstan": "^1.9.0" + "phpstan/phpstan": "^1.9.3" }, "conflict": { "phpunit/phpunit": "<7.0" @@ -1870,9 +1871,9 @@ "description": "PHPUnit extensions and rules for PHPStan", "support": { "issues": "https://github.com/phpstan/phpstan-phpunit/issues", - "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.0" + "source": "https://github.com/phpstan/phpstan-phpunit/tree/1.3.2" }, - "time": "2022-12-07T15:46:24+00:00" + "time": "2022-12-13T15:08:22+00:00" }, { "name": "phpstan/phpstan-strict-rules", @@ -1924,16 +1925,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.19", + "version": "9.2.22", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "c77b56b63e3d2031bd8997fcec43c1925ae46559" + "reference": "e4bf60d2220b4baaa0572986b5d69870226b06df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c77b56b63e3d2031bd8997fcec43c1925ae46559", - "reference": "c77b56b63e3d2031bd8997fcec43c1925ae46559", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/e4bf60d2220b4baaa0572986b5d69870226b06df", + "reference": "e4bf60d2220b4baaa0572986b5d69870226b06df", "shasum": "" }, "require": { @@ -1989,7 +1990,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.19" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.22" }, "funding": [ { @@ -1997,7 +1998,7 @@ "type": "github" } ], - "time": "2022-11-18T07:47:47+00:00" + "time": "2022-12-18T16:40:55+00:00" }, { "name": "phpunit/php-file-iterator", diff --git a/src/data/bedrock/PotionTypeIdMap.php b/src/data/bedrock/PotionTypeIdMap.php index eebab87e2..2e6fef3cc 100644 --- a/src/data/bedrock/PotionTypeIdMap.php +++ b/src/data/bedrock/PotionTypeIdMap.php @@ -33,13 +33,13 @@ final class PotionTypeIdMap{ * @var PotionType[] * @phpstan-var array */ - private array $idToEnum; + private array $idToEnum = []; /** * @var int[] * @phpstan-var array */ - private array $enumToId; + private array $enumToId = []; private function __construct(){ $this->register(PotionTypeIds::WATER, PotionType::WATER()); diff --git a/tests/phpstan/configs/phpstan-bugs.neon b/tests/phpstan/configs/phpstan-bugs.neon index c84371b11..3ee56e8be 100644 --- a/tests/phpstan/configs/phpstan-bugs.neon +++ b/tests/phpstan/configs/phpstan-bugs.neon @@ -15,11 +15,6 @@ parameters: count: 1 path: ../../../src/entity/projectile/Projectile.php - - - message: "#^Empty array passed to foreach\\.$#" - count: 1 - path: ../../../src/network/mcpe/cache/ChunkCache.php - - message: "#^Match arm comparison between 4 and 4 is always true\\.$#" count: 1 @@ -51,7 +46,7 @@ parameters: path: ../../../src/plugin/PluginManager.php - - message: "#^Offset \\(int\\|string\\) on non\\-empty\\-array\\ in isset\\(\\) always exists and is not nullable\\.$#" + message: "#^Offset \\(int\\|string\\) on array\\ in isset\\(\\) always exists and is not nullable\\.$#" count: 1 path: ../../../src/plugin/PluginManager.php @@ -70,11 +65,6 @@ parameters: count: 1 path: ../../../src/thread/Worker.php - - - message: "#^Offset \\(int\\|string\\) on non\\-empty\\-array\\ in isset\\(\\) always exists and is not nullable\\.$#" - count: 1 - path: ../../../src/world/WorldManager.php - - message: "#^Call to function is_resource\\(\\) with resource will always evaluate to true\\.$#" count: 2