diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2d1452c..c4aba82 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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') }} @@ -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') }} diff --git a/src/simpleRdf/Dataset.php b/src/simpleRdf/Dataset.php index 5f0f70e..ff97542 100644 --- a/src/simpleRdf/Dataset.php +++ b/src/simpleRdf/Dataset.php @@ -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);