Skip to content

Commit

Permalink
Allow PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
maennchen committed Dec 4, 2022
1 parent 817b786 commit 4284206
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/part_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
id: setup-php
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
php-version: "8.1"
tools: phive
- name: Cache Tools
uses: actions/cache@v3
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/part_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ["8.2"]
php: ["8.1", "8.2"]
os: [ubuntu-latest]
experimental: [false]
include:
- php: nightly
os: ubuntu-latest
experimental: true
- php: "8.2"
- php: "8.1"
os: windows-latest
experimental: false
- php: 8.2
- php: 8.1
os: macos-latest
experimental: false

Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
id: setup-php
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
php-version: "8.1"
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
id: setup-php
uses: shivammathur/setup-php@v2
with:
php-version: "8.2"
php-version: "8.1"
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
php 8.2.0RC7
php 8.1.13
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ $zip->finish();

### General

- Minimum PHP Version: `8.2`
- Minimum PHP Version: `8.1`
- Only 64bit Architecture is supported.
- The class `ZipStream\Option\Method` has been replaced with the enum `ZipStream\CompressionMethod`.
- Most clases have been flagged as `@internal` and should not be used from the outside.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
],
"require": {
"php-64bit": "^8.2",
"php-64bit": "^8.1",
"symfony/polyfill-mbstring": "^1.0",
"psr/http-message": "^1.0",
"ext-zlib": "*"
Expand Down
1 change: 0 additions & 1 deletion psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
php-version="8.2"
>
<projectFiles>
<directory name="src" />
Expand Down
7 changes: 4 additions & 3 deletions src/PackField.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@

/**
* @internal
* TODO: Make class readonly when requiring PHP 8.2 exclusively
*/
readonly class PackField
class PackField
{
public const MAX_V = 0xFFFFFFFF;

public const MAX_v = 0xFFFF;

public function __construct(
public string $format,
public int|string $value
public readonly string $format,
public readonly int|string $value
) {
}

Expand Down
14 changes: 10 additions & 4 deletions test/EndlessCycleStream.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,20 @@ public function close(): void
$this->detach();
}

public function detach(): null
/**
* @return null
*/
public function detach()
{
return null;
return;
}

public function getSize(): null
/**
* @return null
*/
public function getSize()
{
return null;
return;
}

public function tell(): int
Expand Down

0 comments on commit 4284206

Please sign in to comment.