Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support php8 #54

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
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=8.2
FROM php:${PHP_VERSION}

ARG DEBIAN_FRONTEND=noninteractive
ARG COMPOSER_FLAGS="--prefer-dist --no-interaction"
Expand Down
6 changes: 6 additions & 0 deletions src/CsvReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace Keboola\Csv;

use Iterator;
use ReturnTypeWillChange;

class CsvReader extends AbstractCsvFile implements Iterator
{
Expand Down Expand Up @@ -169,6 +170,7 @@ public function getLineBreak()
/**
* @inheritdoc
*/
#[ReturnTypeWillChange]
public function rewind()
{
rewind($this->getFilePointer());
Expand Down Expand Up @@ -217,6 +219,7 @@ public function getLineBreakAsText()
/**
* @inheritdoc
*/
#[ReturnTypeWillChange]
public function current()
{
return $this->currentRow;
Expand All @@ -225,6 +228,7 @@ public function current()
/**
* @inheritdoc
*/
#[ReturnTypeWillChange]
public function next()
{
$this->currentRow = $this->readLine();
Expand All @@ -234,6 +238,7 @@ public function next()
/**
* @inheritdoc
*/
#[ReturnTypeWillChange]
public function key()
{
return $this->rowCounter;
Expand All @@ -242,6 +247,7 @@ public function key()
/**
* @inheritdoc
*/
#[ReturnTypeWillChange]
public function valid()
{
return $this->currentRow !== false;
Expand Down
Loading