diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 97b80a530..23a583af1 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.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.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.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.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' 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/world/format/io/region/RegionLoader.php b/src/world/format/io/region/RegionLoader.php index b2aa71c5a..1aa06812f 100644 --- a/src/world/format/io/region/RegionLoader.php +++ b/src/world/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,13 +44,11 @@ use function fwrite; use function is_resource; use function ksort; use function max; -use function ord; 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;