Skip to content

Commit

Permalink
Add support for PHP 8.1 and drop support for PHP 7.0 (#73)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
acelaya authored Dec 7, 2021
1 parent 41e8158 commit 6b3a785
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"homepage": "https://github.com/rlanvin/php-ip",
"license": "MIT",
"require": {
"php": ">=7.0",
"php": ">=7.1",
"ext-gmp": "*"
},
"require-dev": {
Expand All @@ -22,4 +22,4 @@
"PhpIP\\Tests\\": "tests/"
}
}
}
}
4 changes: 2 additions & 2 deletions src/IPBlock.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand All @@ -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');
}
Expand Down

2 comments on commit 6b3a785

@GrahamCampbell
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding a return type to a non-private method of a non-final class is a major breaking change btw. :)

@GrahamCampbell
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see this is for inclusion in the v3.0.0 release. Ignore me! :)

Please sign in to comment.