Skip to content

Commit

Permalink
Dropped support for PHP < 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ankane committed Feb 18, 2024
1 parent 98d596f commit 37f520a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 0.2.0 (unreleased)

- Changed `Distance` to enum
- Dropped support for PHP < 8.1

## 0.1.4 (2023-11-14)

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
},
"require": {
"php": ">= 7.4"
"php": ">= 8.1"
},
"require-dev": {
"phpunit/phpunit": "^10",
Expand Down
3 changes: 1 addition & 2 deletions src/Vector.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ public function __construct($value)
}
}

// TODO use array_is_list when PHP < 8.1 no longer supported
if (!is_array($value)) {
if (!is_array($value) || !array_is_list($value)) {
throw new \InvalidArgumentException("Expected array");
}

Expand Down

0 comments on commit 37f520a

Please sign in to comment.