From 06493da7d9a59f186f07b92531add2ba91edc67c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 2 Feb 2021 13:58:07 +0000 Subject: [PATCH 1/4] Imports cleanup --- src/pocketmine/level/format/io/region/RegionLoader.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/pocketmine/level/format/io/region/RegionLoader.php b/src/pocketmine/level/format/io/region/RegionLoader.php index 0d17ae3b8..152d4aa67 100644 --- a/src/pocketmine/level/format/io/region/RegionLoader.php +++ b/src/pocketmine/level/format/io/region/RegionLoader.php @@ -34,7 +34,6 @@ use function ceil; use function chr; use function clearstatcache; use function fclose; -use function feof; use function file_exists; use function filesize; use function fopen; @@ -45,14 +44,12 @@ use function fwrite; use function is_resource; use function ksort; use function max; -use function ord; use function pack; use function str_pad; use function str_repeat; use function stream_set_read_buffer; use function stream_set_write_buffer; use function strlen; -use function substr; use function time; use function touch; use function unpack; From 2e9117d102b1b5c734292ff0bcdcbc49e3748a89 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 2 Feb 2021 14:04:50 +0000 Subject: [PATCH 2/4] Release 3.17.4 --- changelogs/3.17.md | 9 +++++++++ src/pocketmine/VersionInfo.php | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/changelogs/3.17.md b/changelogs/3.17.md index 277c10ee0..6c78eaafe 100644 --- a/changelogs/3.17.md +++ b/changelogs/3.17.md @@ -32,3 +32,12 @@ Plugin developers should **only** update their required API to this version if y - Improved performance of region header validation in Region-based worlds (indirect improvement to chunk loading performance). - Fixed some PHP 8.0 language-level compatibility issues. - Source installations will now exit with an error when Composer dependencies are not in sync with the current Git revision. Now, it's required to run `composer install` after every git pull to make sure the correct dependency versions are installed. + +# 3.17.4 +- Removed `readline` support. This hasn't been maintained for many years, never worked correctly, and isn't thread-safe in any case. +- Fixed false-positives of region corruption in Region-based worlds (outdated file stat cache). +- Fixed more deprecation warnings on PHP 8.0 (optional parameter before required). +- `CraftItemEvent->getInputs()` now returns a list starting at offset 0, instead of random offsets. (Note that the contents still won't be ordered.) +- `CraftItemEvent->getOutputs()` now returns a list starting at offset 0, instead of random offsets. (Note that the contents still won't be ordered.) +- Fixed a bug that broke synchronized building, bridging, towering and more. +- Objects in memory dumps no longer show inherited properties multiple times. diff --git a/src/pocketmine/VersionInfo.php b/src/pocketmine/VersionInfo.php index df0e46c88..b45171510 100644 --- a/src/pocketmine/VersionInfo.php +++ b/src/pocketmine/VersionInfo.php @@ -34,5 +34,5 @@ const _VERSION_INFO_INCLUDED = true; const NAME = "PocketMine-MP"; const BASE_VERSION = "3.17.4"; -const IS_DEVELOPMENT_BUILD = true; +const IS_DEVELOPMENT_BUILD = false; const BUILD_NUMBER = 0; From 4771e3dc28af50fc6bb1bef78cbc57c35d54698d Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 2 Feb 2021 14:04:51 +0000 Subject: [PATCH 3/4] 3.17.5 is next --- src/pocketmine/VersionInfo.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/VersionInfo.php b/src/pocketmine/VersionInfo.php index b45171510..feef147d9 100644 --- a/src/pocketmine/VersionInfo.php +++ b/src/pocketmine/VersionInfo.php @@ -33,6 +33,6 @@ if(defined('pocketmine\_VERSION_INFO_INCLUDED')){ const _VERSION_INFO_INCLUDED = true; const NAME = "PocketMine-MP"; -const BASE_VERSION = "3.17.4"; -const IS_DEVELOPMENT_BUILD = false; +const BASE_VERSION = "3.17.5"; +const IS_DEVELOPMENT_BUILD = true; const BUILD_NUMBER = 0; From 96181f8cf5fef8b7690e9d8487bbaea5bad4a692 Mon Sep 17 00:00:00 2001 From: Dylan T Date: Wed, 3 Feb 2021 17:24:50 +0000 Subject: [PATCH 4/4] Version PHP build caches by image version we can't safely use `ubuntu-latest` because the build caches will break if they were built for 18.04 and used on 20.04, or vice versa. Instead, we pin the images (and caches) to a specific version. --- .github/workflows/main.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 503c2136c..c4d5c37d3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,10 +8,11 @@ on: jobs: build-php: name: Prepare PHP - runs-on: ubuntu-latest + runs-on: ${{ matrix.image }} strategy: matrix: + image: [ubuntu-20.04] php: [7.3.25, 7.4.13] steps: @@ -21,7 +22,7 @@ jobs: uses: actions/cache@v2 with: path: "./bin" - key: "php-build-generic-${{ matrix.php }}-${{ hashFiles('./tests/gh-actions/build.sh') }}" + key: "php-build-generic-${{ matrix.php }}-${{ matrix.image }}-${{ hashFiles('./tests/gh-actions/build.sh') }}" - name: Compile PHP if: steps.php-build-cache.outputs.cache-hit != 'true' @@ -30,11 +31,12 @@ jobs: phpstan: name: PHPStan analysis needs: build-php - runs-on: ubuntu-latest + runs-on: ${{ matrix.image }} strategy: fail-fast: false matrix: + image: [ubuntu-20.04] php: [7.3.25, 7.4.13] steps: @@ -45,7 +47,7 @@ jobs: uses: actions/cache@v2 with: path: "./bin" - key: "php-build-generic-${{ matrix.php }}-${{ hashFiles('./tests/gh-actions/build.sh') }}" + key: "php-build-generic-${{ matrix.php }}-${{ matrix.image }}-${{ hashFiles('./tests/gh-actions/build.sh') }}" - name: Kill build on PHP build cache miss (should never happen) if: steps.php-build-cache.outputs.cache-hit != 'true' @@ -76,10 +78,11 @@ jobs: phpunit: name: PHPUnit tests needs: build-php - runs-on: ubuntu-latest + runs-on: ${{ matrix.image }} strategy: fail-fast: false matrix: + image: [ubuntu-20.04] php: [7.3.25, 7.4.13] steps: @@ -90,7 +93,7 @@ jobs: uses: actions/cache@v2 with: path: "./bin" - key: "php-build-generic-${{ matrix.php }}-${{ hashFiles('./tests/gh-actions/build.sh') }}" + key: "php-build-generic-${{ matrix.php }}-${{ matrix.image }}-${{ hashFiles('./tests/gh-actions/build.sh') }}" - name: Kill build on PHP build cache miss (should never happen) if: steps.php-build-cache.outputs.cache-hit != 'true' @@ -121,10 +124,11 @@ jobs: integration: name: Integration tests needs: build-php - runs-on: ubuntu-latest + runs-on: ${{ matrix.image }} strategy: fail-fast: false matrix: + image: [ubuntu-20.04] php: [7.3.25, 7.4.13] steps: @@ -137,7 +141,7 @@ jobs: uses: actions/cache@v2 with: path: "./bin" - key: "php-build-generic-${{ matrix.php }}-${{ hashFiles('./tests/gh-actions/build.sh') }}" + key: "php-build-generic-${{ matrix.php }}-${{ matrix.image }}-${{ hashFiles('./tests/gh-actions/build.sh') }}" - name: Kill build on PHP build cache miss (should never happen) if: steps.php-build-cache.outputs.cache-hit != 'true'