Skip to content

Commit 6b3a785

Browse files
authored
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
1 parent 41e8158 commit 6b3a785

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
10+
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
1111
name: PHP ${{ matrix.php }}
1212
steps:
1313
- name: Checkout

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## [Unreleased]
4+
5+
### Backward Compatibility Breaking Changes
6+
7+
- Dropped support for PHP 7.0
8+
9+
### Added
10+
11+
- Support for PHP 8.1
12+
13+
314
## [3.0.0-rc2] - 2021-07-22
415

516
### Backward Compatibility Breaking Changes

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"homepage": "https://github.com/rlanvin/php-ip",
77
"license": "MIT",
88
"require": {
9-
"php": ">=7.0",
9+
"php": ">=7.1",
1010
"ext-gmp": "*"
1111
},
1212
"require-dev": {
@@ -22,4 +22,4 @@
2222
"PhpIP\\Tests\\": "tests/"
2323
}
2424
}
25-
}
25+
}

src/IPBlock.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ public function offsetGet($offset): IP
604604
*
605605
* {@inheritdoc}
606606
*/
607-
public function offsetSet($offset, $value)
607+
public function offsetSet($offset, $value): void
608608
{
609609
throw new \LogicException('Setting IP in block is not supported');
610610
}
@@ -614,7 +614,7 @@ public function offsetSet($offset, $value)
614614
*
615615
* {@inheritdoc}
616616
*/
617-
public function offsetUnset($offset)
617+
public function offsetUnset($offset): void
618618
{
619619
throw new \LogicException('Unsetting IP in block is not supported');
620620
}

0 commit comments

Comments
 (0)