Skip to content

Bump minimum PHP version to 8.2.0 #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/lint-and-analyse-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build:
analysis:
environment:
php:
version: 8.1
version: 8.2
pecl_extensions:
- dbase
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
]
},
"require": {
"php": "^8.1"
"php": "^8.2"
},
"suggest": {
"ext-dbase": "For dbf files parsing"
Expand Down
11 changes: 8 additions & 3 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

-
Expand All @@ -72,7 +77,7 @@ parameters:

-
message: "#^Cannot access offset int\\<0, max\\> on mixed\\.$#"
count: 14
count: 12
path: src/ShapeRecord.php

-
Expand Down
60 changes: 30 additions & 30 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.15.0@5c774aca4746caf3d239d9c8cadb9f882ca29352">
<files psalm-version="5.25.0@01a8eb06b9e9cc6cfb6a320bf9fb14331919d505">
<file src="src/ShapeFile.php">
<InvalidPropertyAssignmentValue>
<code><![CDATA[$this->shpFile]]></code>
Expand All @@ -10,7 +10,7 @@
<code><![CDATA[$this->boundingBox[$type] ?? 0]]></code>
</MixedArgument>
<MixedAssignment>
<code>$shapeType</code>
<code><![CDATA[$shapeType]]></code>
</MixedAssignment>
<PossiblyFalseArgument>
<code><![CDATA[$this->shpFile]]></code>
Expand All @@ -21,13 +21,13 @@
<code><![CDATA[$this->records[$index]->getContentLength()]]></code>
</PossiblyNullOperand>
<PossiblyUnusedReturnValue>
<code>bool</code>
<code>bool</code>
<code>int</code>
<code><![CDATA[bool]]></code>
<code><![CDATA[bool]]></code>
<code><![CDATA[int]]></code>
</PossiblyUnusedReturnValue>
<UnusedFunctionCall>
<code>dbase_close</code>
<code>dbase_pack</code>
<code><![CDATA[dbase_close]]></code>
<code><![CDATA[dbase_pack]]></code>
</UnusedFunctionCall>
</file>
<file src="src/ShapeRecord.php">
Expand All @@ -41,8 +41,8 @@
<code><![CDATA[$data['y']]]></code>
<code><![CDATA[$data['y']]]></code>
<code><![CDATA[$data['z']]]></code>
<code>$pointData</code>
<code>$pointData[$type]</code>
<code><![CDATA[$pointData]]></code>
<code><![CDATA[$pointData[$type]]]></code>
<code><![CDATA[$this->shpData['parts']]]></code>
<code><![CDATA[$this->shpData['parts']]]></code>
<code><![CDATA[$this->shpData['parts']]]></code>
Expand All @@ -65,7 +65,7 @@
<MixedArrayAccess>
<code><![CDATA[$partData['points']]]></code>
<code><![CDATA[$partData['points']]]></code>
<code>$pointData[$type]</code>
<code><![CDATA[$pointData[$type]]]></code>
<code><![CDATA[$this->shpData['parts'][$i]]]></code>
<code><![CDATA[$this->shpData['parts'][$i]]]></code>
<code><![CDATA[$this->shpData['parts'][$i]]]></code>
Expand All @@ -82,7 +82,7 @@
<code><![CDATA[$this->shpData['points'][$i]]]></code>
<code><![CDATA[$this->shpData['points'][$i][$type]]]></code>
<code><![CDATA[$this->shpData['points'][count($this->shpData['points']) - 1]]]></code>
<code>$value</code>
<code><![CDATA[$value]]></code>
</MixedArrayAccess>
<MixedArrayAssignment>
<code><![CDATA[$this->shpData['parts'][$partIndex]]]></code>
Expand All @@ -101,46 +101,46 @@
</MixedArrayAssignment>
<MixedArrayOffset>
<code><![CDATA[$this->dbfData[$value]]]></code>
<code>$tmp[$value]</code>
<code><![CDATA[$tmp[$value]]]></code>
</MixedArrayOffset>
<MixedAssignment>
<code><![CDATA[$data['m']]]></code>
<code><![CDATA[$data['m']]]></code>
<code><![CDATA[$data['z']]]></code>
<code>$numparts</code>
<code>$numparts</code>
<code>$numpoints</code>
<code>$numpoints</code>
<code>$partData</code>
<code>$partData</code>
<code>$point</code>
<code>$pointData</code>
<code>$pointData</code>
<code><![CDATA[$numparts]]></code>
<code><![CDATA[$numparts]]></code>
<code><![CDATA[$numpoints]]></code>
<code><![CDATA[$numpoints]]></code>
<code><![CDATA[$partData]]></code>
<code><![CDATA[$partData]]></code>
<code><![CDATA[$point]]></code>
<code><![CDATA[$pointData]]></code>
<code><![CDATA[$pointData]]></code>
<code><![CDATA[$point['m']]]></code>
<code><![CDATA[$point['z']]]></code>
<code>$recordNumber</code>
<code>$shapeType</code>
<code>$size</code>
<code><![CDATA[$recordNumber]]></code>
<code><![CDATA[$shapeType]]></code>
<code><![CDATA[$size]]></code>
<code><![CDATA[$this->size]]></code>
<code>[$value]</code>
<code><![CDATA[[$value]]]></code>
</MixedAssignment>
<MixedOperand>
<code>$size</code>
<code><![CDATA[$size]]></code>
<code><![CDATA[$this->shpData['numpoints']]]></code>
<code><![CDATA[$this->shpData['numpoints']]]></code>
<code><![CDATA[$this->shpData['numpoints'] ?? 0]]></code>
<code><![CDATA[$this->shpData['numpoints'] ?? 0]]></code>
</MixedOperand>
<PossiblyNullReference>
<code>hasMeasure</code>
<code>hasMeasure</code>
<code>readSHP</code>
<code><![CDATA[hasMeasure]]></code>
<code><![CDATA[hasMeasure]]></code>
<code><![CDATA[readSHP]]></code>
</PossiblyNullReference>
<PossiblyUndefinedArrayOffset>
<code><![CDATA[$this->shpData['parts']]]></code>
</PossiblyUndefinedArrayOffset>
<PropertyNotSetInConstructor>
<code>$shpFile</code>
<code><![CDATA[$shpFile]]></code>
</PropertyNotSetInConstructor>
</file>
<file src="tests/ShapeFileTest.php">
Expand Down
Loading