From 6b3a785c822c01e6a07b1cc418c95f45d0e860d5 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Tue, 7 Dec 2021 13:18:04 +0100 Subject: [PATCH] Add support for PHP 8.1 and drop support for PHP 7.0 (#73) * Added PHP 8.1 to the test workflow * Added missing return types for PHP 8.1 compatibility, and removed PHP 7.0 support * Noticed in changelog that support for PHP 7.0 has been dropped * Updated CHANGELOG, referencing support for PHP 8.1 --- .github/workflows/tests.yml | 2 +- CHANGELOG.md | 11 +++++++++++ composer.json | 4 ++-- src/IPBlock.php | 4 ++-- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 152cf58..9eb50a9 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0'] + php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1'] name: PHP ${{ matrix.php }} steps: - name: Checkout diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bd03ba..3aa08aa 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## [Unreleased] + +### Backward Compatibility Breaking Changes + +- Dropped support for PHP 7.0 + +### Added + +- Support for PHP 8.1 + + ## [3.0.0-rc2] - 2021-07-22 ### Backward Compatibility Breaking Changes diff --git a/composer.json b/composer.json index 8d2c6cf..b29708d 100755 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "homepage": "https://github.com/rlanvin/php-ip", "license": "MIT", "require": { - "php": ">=7.0", + "php": ">=7.1", "ext-gmp": "*" }, "require-dev": { @@ -22,4 +22,4 @@ "PhpIP\\Tests\\": "tests/" } } -} \ No newline at end of file +} diff --git a/src/IPBlock.php b/src/IPBlock.php index 189ea1c..b36b476 100644 --- a/src/IPBlock.php +++ b/src/IPBlock.php @@ -604,7 +604,7 @@ public function offsetGet($offset): IP * * {@inheritdoc} */ - public function offsetSet($offset, $value) + public function offsetSet($offset, $value): void { throw new \LogicException('Setting IP in block is not supported'); } @@ -614,7 +614,7 @@ public function offsetSet($offset, $value) * * {@inheritdoc} */ - public function offsetUnset($offset) + public function offsetUnset($offset): void { throw new \LogicException('Unsetting IP in block is not supported'); }