diff --git a/.github/workflows/lint-and-analyse-php.yml b/.github/workflows/lint-and-analyse-php.yml index 6c3f782..8045bdd 100644 --- a/.github/workflows/lint-and-analyse-php.yml +++ b/.github/workflows/lint-and-analyse-php.yml @@ -11,10 +11,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Set up PHP 8.1 + - name: Set up PHP 8.2 uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.2 - name: Validate composer.json and composer.lock run: composer validate --strict @@ -33,10 +33,10 @@ jobs: - name: Checkout code uses: actions/checkout@v4 - - name: Set up PHP 8.1 + - name: Set up PHP 8.2 uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.2 extensions: dbase - name: Install Composer dependencies diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1ab9c26..540c91e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: continue-on-error: ${{ matrix.experimental }} strategy: matrix: - php-version: ['8.1', '8.2', '8.3'] + php-version: ['8.2', '8.3'] php-extensions: ['dbase', ':dbase'] os: [ubuntu-latest] experimental: [false] diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 609b856..6cc2be2 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -18,7 +18,7 @@ build: analysis: environment: php: - version: 8.1 + version: 8.2 pecl_extensions: - dbase dependencies: diff --git a/CHANGELOG.md b/CHANGELOG.md index 010facf..c3488bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] ### Removed -- Drop support for PHP 7.1, PHP 7.2, PHP 7.3, PHP 7.4 and PHP 8.0 +- Drop support for PHP 7.1, PHP 7.2, PHP 7.3, PHP 7.4, PHP 8.0 and PHP 8.1 ## [3.0.2] - 2023-09-11 ### Added diff --git a/composer.json b/composer.json index 8e7ce8e..46ded27 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ ] }, "require": { - "php": "^8.1" + "php": "^8.2" }, "suggest": { "ext-dbase": "For dbf files parsing" diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index bf6f6df..19a9a22 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -45,6 +45,11 @@ parameters: count: 1 path: src/ShapeFile.php + - + message: "#^Parameter \\#2 \\$length of function fread expects int\\<1, max\\>, int\\<0, max\\> given\\.$#" + count: 1 + path: src/ShapeFile.php + - message: "#^Argument of an invalid type mixed supplied for foreach, only iterables are supported\\.$#" count: 4 @@ -57,12 +62,12 @@ parameters: - message: "#^Cannot access offset 'points' on mixed\\.$#" - count: 17 + count: 15 path: src/ShapeRecord.php - message: "#^Cannot access offset int on mixed\\.$#" - count: 14 + count: 12 path: src/ShapeRecord.php - @@ -72,7 +77,7 @@ parameters: - message: "#^Cannot access offset int\\<0, max\\> on mixed\\.$#" - count: 14 + count: 12 path: src/ShapeRecord.php - diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 50bdba5..c228e92 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + shpFile]]> @@ -10,7 +10,7 @@ boundingBox[$type] ?? 0]]> - $shapeType + shpFile]]> @@ -21,13 +21,13 @@ records[$index]->getContentLength()]]> - bool - bool - int + + + - dbase_close - dbase_pack + + @@ -41,8 +41,8 @@ - $pointData - $pointData[$type] + + shpData['parts']]]> shpData['parts']]]> shpData['parts']]]> @@ -65,7 +65,7 @@ - $pointData[$type] + shpData['parts'][$i]]]> shpData['parts'][$i]]]> shpData['parts'][$i]]]> @@ -82,7 +82,7 @@ shpData['points'][$i]]]> shpData['points'][$i][$type]]]> shpData['points'][count($this->shpData['points']) - 1]]]> - $value + shpData['parts'][$partIndex]]]> @@ -101,46 +101,46 @@ dbfData[$value]]]> - $tmp[$value] + - $numparts - $numparts - $numpoints - $numpoints - $partData - $partData - $point - $pointData - $pointData + + + + + + + + + - $recordNumber - $shapeType - $size + + + size]]> - [$value] + - $size + shpData['numpoints']]]> shpData['numpoints']]]> shpData['numpoints'] ?? 0]]> shpData['numpoints'] ?? 0]]> - hasMeasure - hasMeasure - readSHP + + + shpData['parts']]]> - $shpFile +