diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 26855f0..982d61d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -9,6 +9,12 @@ env: jobs: tests: runs-on: ubuntu-latest + strategy: + matrix: + php: + - '7.4' + - '8.0' + - '8.1' steps: - name: 'Check out the repo' @@ -19,7 +25,7 @@ jobs: run: 'docker login --username "$DOCKERHUB_USER" --password "$DOCKERHUB_TOKEN"' - name: 'Build image' - run: 'docker build -t $APP_IMAGE .' + run: 'docker build --build-arg="PHP_VERSION=${{ matrix.php}}" -t $APP_IMAGE .' - name: 'Run tests' run: 'docker run ${{env.APP_IMAGE}} composer ci' \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 462ebcb..d1a199e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -FROM php:7.4 +ARG PHP_VERSION=8.2 +FROM php:${PHP_VERSION} ARG DEBIAN_FRONTEND=noninteractive ARG COMPOSER_FLAGS="--prefer-dist --no-interaction" diff --git a/src/CsvReader.php b/src/CsvReader.php index de343f0..40e42ee 100644 --- a/src/CsvReader.php +++ b/src/CsvReader.php @@ -5,6 +5,7 @@ namespace Keboola\Csv; use Iterator; +use ReturnTypeWillChange; class CsvReader extends AbstractCsvFile implements Iterator { @@ -169,6 +170,7 @@ public function getLineBreak() /** * @inheritdoc */ + #[ReturnTypeWillChange] public function rewind() { rewind($this->getFilePointer()); @@ -217,6 +219,7 @@ public function getLineBreakAsText() /** * @inheritdoc */ + #[ReturnTypeWillChange] public function current() { return $this->currentRow; @@ -225,6 +228,7 @@ public function current() /** * @inheritdoc */ + #[ReturnTypeWillChange] public function next() { $this->currentRow = $this->readLine(); @@ -234,6 +238,7 @@ public function next() /** * @inheritdoc */ + #[ReturnTypeWillChange] public function key() { return $this->rowCounter; @@ -242,6 +247,7 @@ public function key() /** * @inheritdoc */ + #[ReturnTypeWillChange] public function valid() { return $this->currentRow !== false;