Skip to content

Commit

Permalink
support php8
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrajodas committed Nov 14, 2023
1 parent ea1e00e commit 6a523f2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ env:
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php:
- '5.6'
- '7.4'
- '8.0'
- '8.1'
steps:
-
name: 'Check out the repo'
Expand All @@ -19,7 +26,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'
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM php:7.4
ARG PHP_VERSION=1.21
FROM php:${PHP_VERSION}

ARG DEBIAN_FRONTEND=noninteractive
ARG COMPOSER_FLAGS="--prefer-dist --no-interaction"
Expand Down
5 changes: 5 additions & 0 deletions src/CsvReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ public function getLineBreak()
/**
* @inheritdoc
*/
#[\ReturnTypeWillChange]
public function rewind()
{
rewind($this->getFilePointer());
Expand Down Expand Up @@ -217,6 +218,7 @@ public function getLineBreakAsText()
/**
* @inheritdoc
*/
#[\ReturnTypeWillChange]
public function current()
{
return $this->currentRow;
Expand All @@ -225,6 +227,7 @@ public function current()
/**
* @inheritdoc
*/
#[\ReturnTypeWillChange]
public function next()
{
$this->currentRow = $this->readLine();
Expand All @@ -234,6 +237,7 @@ public function next()
/**
* @inheritdoc
*/
#[\ReturnTypeWillChange]
public function key()
{
return $this->rowCounter;
Expand All @@ -242,6 +246,7 @@ public function key()
/**
* @inheritdoc
*/
#[\ReturnTypeWillChange]
public function valid()
{
return $this->currentRow !== false;
Expand Down

0 comments on commit 6a523f2

Please sign in to comment.