Skip to content

Commit

Permalink
.github/workflows/test.yml: test on various PHP versions
Browse files Browse the repository at this point in the history
  • Loading branch information
zozlak committed Sep 26, 2024
1 parent a8be3d7 commit 46cb6e0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
20 changes: 16 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@ on: push
jobs:
phpunit:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1, 8.2, 8.3, 8.4]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
env:
fail-fast: true
- uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down Expand Up @@ -36,8 +45,11 @@ jobs:
phpstan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.4
- uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
Expand Down
2 changes: 1 addition & 1 deletion src/simpleRdf/Dataset.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public function deleteExcept(QuadCompareInterface | QuadIteratorInterface | Quad
}

public function forEach(callable $fn,
QuadCompareInterface | QuadIteratorInterface | QuadIteratorAggregateInterface | callable $filter = null): void {
QuadCompareInterface | QuadIteratorInterface | QuadIteratorAggregateInterface | callable | null $filter = null): void {
$idx = iterator_to_array($this->findMatchingQuads($filter)); // we need a copy as $this->quads will be modified in-place
foreach ($idx as $i) {
$val = $fn($this->quads[$i], $this);
Expand Down

0 comments on commit 46cb6e0

Please sign in to comment.