From 8caab8ab48d83128378a71e45fcf16222754da9b Mon Sep 17 00:00:00 2001 From: sebprt Date: Tue, 21 Nov 2023 14:14:42 +0100 Subject: [PATCH 1/8] Updated the pipeline runner used for tests --- src/CSV/FingersCrossed/Extractor.php | 3 +-- src/CSV/FingersCrossed/Loader.php | 7 +++---- src/CSV/Safe/Extractor.php | 3 +-- src/CSV/Safe/Loader.php | 7 +++---- src/Sheet/FingersCrossed/Extractor.php | 3 +-- src/Sheet/FingersCrossed/Loader.php | 4 ++-- src/Sheet/Safe/Extractor.php | 3 +-- src/Sheet/Safe/Loader.php | 4 ++-- tests/functional/PipelineRunner.php | 17 ++++++----------- 9 files changed, 20 insertions(+), 31 deletions(-) diff --git a/src/CSV/FingersCrossed/Extractor.php b/src/CSV/FingersCrossed/Extractor.php index 5a7a1dd..ecc1927 100644 --- a/src/CSV/FingersCrossed/Extractor.php +++ b/src/CSV/FingersCrossed/Extractor.php @@ -18,8 +18,7 @@ public function __construct( private ReaderInterface $reader, private int $skipLines = 0, private LoggerInterface $logger = new NullLogger() - ) { - } + ) {} public function extract(): iterable { diff --git a/src/CSV/FingersCrossed/Loader.php b/src/CSV/FingersCrossed/Loader.php index 7ec9185..8a655bf 100644 --- a/src/CSV/FingersCrossed/Loader.php +++ b/src/CSV/FingersCrossed/Loader.php @@ -22,8 +22,7 @@ public function __construct( private WriterInterface $writer, private LoggerInterface $logger = new NullLogger() - ) { - } + ) {} public function load(): \Generator { @@ -32,7 +31,7 @@ public function load(): \Generator $this->writer->addRow( new Row(array_map(fn ($value) => new Cell($value), array_keys($line)), null) ); - } catch (WriterNotOpenedException|IOException $exception) { + } catch (IOException|WriterNotOpenedException $exception) { $this->logger->error('Impossible to load data to the given CSV file.', ['line' => $line, 'message' => $exception->getMessage(), 'previous' => $exception->getPrevious()]); return; @@ -43,7 +42,7 @@ public function load(): \Generator $this->writer->addRow( new Row(array_map(fn ($value) => new Cell($value), $line), null) ); - } catch (WriterNotOpenedException|IOException $exception) { + } catch (IOException|WriterNotOpenedException $exception) { $this->logger->error('Impossible to load data to the given CSV file.', ['line' => $line, 'message' => $exception->getMessage(), 'previous' => $exception->getPrevious()]); } diff --git a/src/CSV/Safe/Extractor.php b/src/CSV/Safe/Extractor.php index 5aca5c0..0b0021b 100644 --- a/src/CSV/Safe/Extractor.php +++ b/src/CSV/Safe/Extractor.php @@ -18,8 +18,7 @@ public function __construct( private ReaderInterface $reader, private int $skipLines = 0, private LoggerInterface $logger = new NullLogger() - ) { - } + ) {} public function extract(): iterable { diff --git a/src/CSV/Safe/Loader.php b/src/CSV/Safe/Loader.php index cd88354..27e0ca7 100644 --- a/src/CSV/Safe/Loader.php +++ b/src/CSV/Safe/Loader.php @@ -22,8 +22,7 @@ public function __construct( private WriterInterface $writer, private LoggerInterface $logger = new NullLogger() - ) { - } + ) {} public function load(): \Generator { @@ -33,7 +32,7 @@ public function load(): \Generator $this->writer->addRow( new Row(array_map(fn ($value) => new Cell($value), array_keys($line)), null) ); - } catch (WriterNotOpenedException|IOException $exception) { + } catch (IOException|WriterNotOpenedException $exception) { $this->logger->error('Impossible to load data to the given CSV file.', ['line' => $line, 'message' => $exception->getMessage(), 'previous' => $exception->getPrevious()]); return; @@ -42,7 +41,7 @@ public function load(): \Generator while (true) { try { $this->writer->addRow($this->orderColumns($headers, $line)); - } catch (WriterNotOpenedException|IOException $exception) { + } catch (IOException|WriterNotOpenedException $exception) { $this->logger->error('Impossible to load data to the given CSV file.', ['line' => $line, 'message' => $exception->getMessage(), 'previous' => $exception->getPrevious()]); } diff --git a/src/Sheet/FingersCrossed/Extractor.php b/src/Sheet/FingersCrossed/Extractor.php index 6ba9d0a..37d643d 100644 --- a/src/Sheet/FingersCrossed/Extractor.php +++ b/src/Sheet/FingersCrossed/Extractor.php @@ -21,8 +21,7 @@ public function __construct( private string $sheetName, private int $skipLines = 0, private LoggerInterface $logger = new NullLogger() - ) { - } + ) {} public function extract(): iterable { diff --git a/src/Sheet/FingersCrossed/Loader.php b/src/Sheet/FingersCrossed/Loader.php index dcdc77e..3bcbe1f 100644 --- a/src/Sheet/FingersCrossed/Loader.php +++ b/src/Sheet/FingersCrossed/Loader.php @@ -36,7 +36,7 @@ public function load(): \Generator $this->writer->addRow( new Row(array_map(fn ($value) => new Cell($value), array_keys($line)), null) ); - } catch (WriterNotOpenedException|IOException $exception) { + } catch (IOException|WriterNotOpenedException $exception) { $this->logger->error('Impossible to load data to the given CSV file.', ['line' => $line, 'message' => $exception->getMessage(), 'previous' => $exception->getPrevious()]); return; @@ -47,7 +47,7 @@ public function load(): \Generator $this->writer->addRow( new Row(array_map(fn ($value) => new Cell($value), $line), null) ); - } catch (WriterNotOpenedException|IOException $exception) { + } catch (IOException|WriterNotOpenedException $exception) { $this->logger->error('Impossible to load data to the given CSV file.', ['line' => $line, 'message' => $exception->getMessage(), 'previous' => $exception->getPrevious()]); } diff --git a/src/Sheet/Safe/Extractor.php b/src/Sheet/Safe/Extractor.php index 62a9c1e..949312c 100644 --- a/src/Sheet/Safe/Extractor.php +++ b/src/Sheet/Safe/Extractor.php @@ -21,8 +21,7 @@ public function __construct( private string $sheetName, private int $skipLines = 0, private LoggerInterface $logger = new NullLogger() - ) { - } + ) {} public function extract(): iterable { diff --git a/src/Sheet/Safe/Loader.php b/src/Sheet/Safe/Loader.php index d00e6b5..7b8dac6 100644 --- a/src/Sheet/Safe/Loader.php +++ b/src/Sheet/Safe/Loader.php @@ -36,7 +36,7 @@ public function load(): \Generator $this->writer->addRow( new Row(array_map(fn ($value) => new Cell($value), array_keys($line)), null) ); - } catch (WriterNotOpenedException|IOException $exception) { + } catch (IOException|WriterNotOpenedException $exception) { $this->logger->error('Impossible to load data to the given CSV file.', ['line' => $line, 'message' => $exception->getMessage(), 'previous' => $exception->getPrevious()]); return; @@ -45,7 +45,7 @@ public function load(): \Generator while (true) { try { $this->writer->addRow($this->orderColumns($headers, $line)); - } catch (WriterNotOpenedException|IOException $exception) { + } catch (IOException|WriterNotOpenedException $exception) { $this->logger->error('Impossible to load data to the given CSV file.', ['line' => $line, 'message' => $exception->getMessage(), 'previous' => $exception->getPrevious()]); } diff --git a/tests/functional/PipelineRunner.php b/tests/functional/PipelineRunner.php index a6058a1..060dc00 100644 --- a/tests/functional/PipelineRunner.php +++ b/tests/functional/PipelineRunner.php @@ -7,20 +7,18 @@ use Kiboko\Contract\Bucket\AcceptanceResultBucketInterface; use Kiboko\Contract\Bucket\RejectionResultBucketInterface; use Kiboko\Contract\Pipeline\PipelineRunnerInterface; -use Kiboko\Contract\Pipeline\RejectionInterface; -use Kiboko\Contract\Pipeline\StateInterface; +use Kiboko\Contract\Pipeline\StepRejectionInterface; +use Kiboko\Contract\Pipeline\StepStateInterface; final class PipelineRunner implements PipelineRunnerInterface { public function run( \Iterator $source, \Generator $async, - RejectionInterface $rejection, - StateInterface $state, - ): \Iterator { - $state->initialize(); - $rejection->initialize(); - + StepRejectionInterface $rejection, + StepStateInterface $state, + ): \Iterator + { $source->rewind(); $async->rewind(); @@ -40,8 +38,5 @@ public function run( $source->next(); } - - $rejection->teardown(); - $state->teardown(); } } From 55be771912d1db5682f9e60d65fee54fcd5170dc Mon Sep 17 00:00:00 2001 From: sebprt Date: Wed, 22 Nov 2023 11:29:27 +0100 Subject: [PATCH 2/8] Updated phpunit config + fixed phpstan errors --- phpunit.xml | 43 ++++++++++------------------- src/CSV/FingersCrossed/Loader.php | 4 +-- src/CSV/Safe/Loader.php | 4 +-- src/Sheet/FingersCrossed/Loader.php | 4 +-- src/Sheet/Safe/Loader.php | 4 +-- 5 files changed, 23 insertions(+), 36 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index a0d7431..1f7dd58 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,30 +1,17 @@ - - - - tests/functional/ - - - - - src - - - - - + + + + tests/functional/ + + + + + + + + + src + + diff --git a/src/CSV/FingersCrossed/Loader.php b/src/CSV/FingersCrossed/Loader.php index 8a655bf..c08ca11 100644 --- a/src/CSV/FingersCrossed/Loader.php +++ b/src/CSV/FingersCrossed/Loader.php @@ -26,7 +26,7 @@ public function __construct( public function load(): \Generator { - $line = yield; + $line = yield new EmptyResultBucket(); try { $this->writer->addRow( new Row(array_map(fn ($value) => new Cell($value), array_keys($line)), null) @@ -37,7 +37,7 @@ public function load(): \Generator return; } - while (true) { + while ($line) { try { $this->writer->addRow( new Row(array_map(fn ($value) => new Cell($value), $line), null) diff --git a/src/CSV/Safe/Loader.php b/src/CSV/Safe/Loader.php index 27e0ca7..333c5af 100644 --- a/src/CSV/Safe/Loader.php +++ b/src/CSV/Safe/Loader.php @@ -26,7 +26,7 @@ public function __construct( public function load(): \Generator { - $line = yield; + $line = yield new EmptyResultBucket(); $headers = array_keys($line); try { $this->writer->addRow( @@ -38,7 +38,7 @@ public function load(): \Generator return; } - while (true) { + while ($line) { try { $this->writer->addRow($this->orderColumns($headers, $line)); } catch (IOException|WriterNotOpenedException $exception) { diff --git a/src/Sheet/FingersCrossed/Loader.php b/src/Sheet/FingersCrossed/Loader.php index 3bcbe1f..3ce013b 100644 --- a/src/Sheet/FingersCrossed/Loader.php +++ b/src/Sheet/FingersCrossed/Loader.php @@ -30,7 +30,7 @@ public function __construct( public function load(): \Generator { - $line = yield; + $line = yield new EmptyResultBucket(); try { $this->writer->addRow( @@ -42,7 +42,7 @@ public function load(): \Generator return; } - while (true) { + while ($line) { try { $this->writer->addRow( new Row(array_map(fn ($value) => new Cell($value), $line), null) diff --git a/src/Sheet/Safe/Loader.php b/src/Sheet/Safe/Loader.php index 7b8dac6..caf2279 100644 --- a/src/Sheet/Safe/Loader.php +++ b/src/Sheet/Safe/Loader.php @@ -30,7 +30,7 @@ public function __construct( public function load(): \Generator { - $line = yield; + $line = yield new EmptyResultBucket(); $headers = array_keys($line); try { $this->writer->addRow( @@ -42,7 +42,7 @@ public function load(): \Generator return; } - while (true) { + while ($line) { try { $this->writer->addRow($this->orderColumns($headers, $line)); } catch (IOException|WriterNotOpenedException $exception) { From 192f6b6e3ca78358f922e98a02c72a11aa9f3c55 Mon Sep 17 00:00:00 2001 From: sebprt Date: Wed, 22 Nov 2023 14:19:28 +0100 Subject: [PATCH 3/8] Fixed design problem : add rejection buckets --- src/CSV/FingersCrossed/Loader.php | 17 +++++++++++++---- src/CSV/Safe/Loader.php | 13 +++++++++++-- src/Sheet/FingersCrossed/Loader.php | 13 +++++++++++-- src/Sheet/Safe/Loader.php | 13 +++++++++++-- 4 files changed, 46 insertions(+), 10 deletions(-) diff --git a/src/CSV/FingersCrossed/Loader.php b/src/CSV/FingersCrossed/Loader.php index c08ca11..78e28fc 100644 --- a/src/CSV/FingersCrossed/Loader.php +++ b/src/CSV/FingersCrossed/Loader.php @@ -11,6 +11,7 @@ use Box\Spout\Writer\WriterInterface; use Kiboko\Component\Bucket\AcceptanceResultBucket; use Kiboko\Component\Bucket\EmptyResultBucket; +use Kiboko\Component\Bucket\RejectionResultBucket; use Kiboko\Contract\Bucket\ResultBucketInterface; use Kiboko\Contract\Pipeline\FlushableInterface; use Kiboko\Contract\Pipeline\LoaderInterface; @@ -26,24 +27,32 @@ public function __construct( public function load(): \Generator { - $line = yield new EmptyResultBucket(); + $line = yield; try { $this->writer->addRow( new Row(array_map(fn ($value) => new Cell($value), array_keys($line)), null) ); } catch (IOException|WriterNotOpenedException $exception) { $this->logger->error('Impossible to load data to the given CSV file.', ['line' => $line, 'message' => $exception->getMessage(), 'previous' => $exception->getPrevious()]); - - return; + $line = yield new RejectionResultBucket( + 'Impossible to load data to the given CSV file.', + $exception, + $line + ); } - while ($line) { + while (true) { try { $this->writer->addRow( new Row(array_map(fn ($value) => new Cell($value), $line), null) ); } catch (IOException|WriterNotOpenedException $exception) { $this->logger->error('Impossible to load data to the given CSV file.', ['line' => $line, 'message' => $exception->getMessage(), 'previous' => $exception->getPrevious()]); + $line = yield new RejectionResultBucket( + 'Impossible to load data to the given CSV file.', + $exception, + $line + ); } $line = yield new AcceptanceResultBucket($line); diff --git a/src/CSV/Safe/Loader.php b/src/CSV/Safe/Loader.php index 333c5af..29a2f16 100644 --- a/src/CSV/Safe/Loader.php +++ b/src/CSV/Safe/Loader.php @@ -11,6 +11,7 @@ use Box\Spout\Writer\WriterInterface; use Kiboko\Component\Bucket\AcceptanceResultBucket; use Kiboko\Component\Bucket\EmptyResultBucket; +use Kiboko\Component\Bucket\RejectionResultBucket; use Kiboko\Contract\Bucket\ResultBucketInterface; use Kiboko\Contract\Pipeline\FlushableInterface; use Kiboko\Contract\Pipeline\LoaderInterface; @@ -34,8 +35,11 @@ public function load(): \Generator ); } catch (IOException|WriterNotOpenedException $exception) { $this->logger->error('Impossible to load data to the given CSV file.', ['line' => $line, 'message' => $exception->getMessage(), 'previous' => $exception->getPrevious()]); - - return; + $line = yield new RejectionResultBucket( + 'Impossible to load data to the given CSV file.', + $exception, + $line + ); } while ($line) { @@ -43,6 +47,11 @@ public function load(): \Generator $this->writer->addRow($this->orderColumns($headers, $line)); } catch (IOException|WriterNotOpenedException $exception) { $this->logger->error('Impossible to load data to the given CSV file.', ['line' => $line, 'message' => $exception->getMessage(), 'previous' => $exception->getPrevious()]); + $line = yield new RejectionResultBucket( + 'Impossible to load data to the given CSV file.', + $exception, + $line + ); } $line = yield new AcceptanceResultBucket($line); diff --git a/src/Sheet/FingersCrossed/Loader.php b/src/Sheet/FingersCrossed/Loader.php index 3ce013b..255b55c 100644 --- a/src/Sheet/FingersCrossed/Loader.php +++ b/src/Sheet/FingersCrossed/Loader.php @@ -11,6 +11,7 @@ use Box\Spout\Writer\WriterInterface; use Kiboko\Component\Bucket\AcceptanceResultBucket; use Kiboko\Component\Bucket\EmptyResultBucket; +use Kiboko\Component\Bucket\RejectionResultBucket; use Kiboko\Contract\Bucket\ResultBucketInterface; use Kiboko\Contract\Pipeline\FlushableInterface; use Kiboko\Contract\Pipeline\LoaderInterface; @@ -38,8 +39,11 @@ public function load(): \Generator ); } catch (IOException|WriterNotOpenedException $exception) { $this->logger->error('Impossible to load data to the given CSV file.', ['line' => $line, 'message' => $exception->getMessage(), 'previous' => $exception->getPrevious()]); - - return; + $line = yield new RejectionResultBucket( + 'Impossible to load data to the given CSV file.', + $exception, + $line + ); } while ($line) { @@ -49,6 +53,11 @@ public function load(): \Generator ); } catch (IOException|WriterNotOpenedException $exception) { $this->logger->error('Impossible to load data to the given CSV file.', ['line' => $line, 'message' => $exception->getMessage(), 'previous' => $exception->getPrevious()]); + $line = yield new RejectionResultBucket( + 'Impossible to load data to the given CSV file.', + $exception, + $line + ); } $line = yield new AcceptanceResultBucket($line); diff --git a/src/Sheet/Safe/Loader.php b/src/Sheet/Safe/Loader.php index caf2279..16f67f4 100644 --- a/src/Sheet/Safe/Loader.php +++ b/src/Sheet/Safe/Loader.php @@ -11,6 +11,7 @@ use Box\Spout\Writer\WriterInterface; use Kiboko\Component\Bucket\AcceptanceResultBucket; use Kiboko\Component\Bucket\EmptyResultBucket; +use Kiboko\Component\Bucket\RejectionResultBucket; use Kiboko\Contract\Bucket\ResultBucketInterface; use Kiboko\Contract\Pipeline\FlushableInterface; use Kiboko\Contract\Pipeline\LoaderInterface; @@ -38,8 +39,11 @@ public function load(): \Generator ); } catch (IOException|WriterNotOpenedException $exception) { $this->logger->error('Impossible to load data to the given CSV file.', ['line' => $line, 'message' => $exception->getMessage(), 'previous' => $exception->getPrevious()]); - - return; + $line = yield new RejectionResultBucket( + 'Impossible to load data to the given CSV file.', + $exception, + $line + ); } while ($line) { @@ -47,6 +51,11 @@ public function load(): \Generator $this->writer->addRow($this->orderColumns($headers, $line)); } catch (IOException|WriterNotOpenedException $exception) { $this->logger->error('Impossible to load data to the given CSV file.', ['line' => $line, 'message' => $exception->getMessage(), 'previous' => $exception->getPrevious()]); + $line = yield new RejectionResultBucket( + 'Impossible to load data to the given CSV file.', + $exception, + $line + ); } $line = yield new AcceptanceResultBucket($line); From c105457d2080dd3d5388553c5fd0e41ecc237275 Mon Sep 17 00:00:00 2001 From: sebprt Date: Wed, 22 Nov 2023 14:35:34 +0100 Subject: [PATCH 4/8] Added PHPStan rule to ignore while(true) statement --- src/CSV/FingersCrossed/Loader.php | 4 +++- src/CSV/Safe/Loader.php | 4 +++- src/Sheet/FingersCrossed/Loader.php | 4 +++- src/Sheet/Safe/Loader.php | 4 +++- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/CSV/FingersCrossed/Loader.php b/src/CSV/FingersCrossed/Loader.php index 78e28fc..7614357 100644 --- a/src/CSV/FingersCrossed/Loader.php +++ b/src/CSV/FingersCrossed/Loader.php @@ -27,7 +27,7 @@ public function __construct( public function load(): \Generator { - $line = yield; + $line = yield new EmptyResultBucket(); try { $this->writer->addRow( new Row(array_map(fn ($value) => new Cell($value), array_keys($line)), null) @@ -41,6 +41,7 @@ public function load(): \Generator ); } + /* @phpstan-ignore-next-line */ while (true) { try { $this->writer->addRow( @@ -53,6 +54,7 @@ public function load(): \Generator $exception, $line ); + continue; } $line = yield new AcceptanceResultBucket($line); diff --git a/src/CSV/Safe/Loader.php b/src/CSV/Safe/Loader.php index 29a2f16..a27ed69 100644 --- a/src/CSV/Safe/Loader.php +++ b/src/CSV/Safe/Loader.php @@ -42,7 +42,8 @@ public function load(): \Generator ); } - while ($line) { + /* @phpstan-ignore-next-line */ + while (true) { try { $this->writer->addRow($this->orderColumns($headers, $line)); } catch (IOException|WriterNotOpenedException $exception) { @@ -52,6 +53,7 @@ public function load(): \Generator $exception, $line ); + continue; } $line = yield new AcceptanceResultBucket($line); diff --git a/src/Sheet/FingersCrossed/Loader.php b/src/Sheet/FingersCrossed/Loader.php index 255b55c..2321faa 100644 --- a/src/Sheet/FingersCrossed/Loader.php +++ b/src/Sheet/FingersCrossed/Loader.php @@ -46,7 +46,8 @@ public function load(): \Generator ); } - while ($line) { + /* @phpstan-ignore-next-line */ + while (true) { try { $this->writer->addRow( new Row(array_map(fn ($value) => new Cell($value), $line), null) @@ -58,6 +59,7 @@ public function load(): \Generator $exception, $line ); + continue; } $line = yield new AcceptanceResultBucket($line); diff --git a/src/Sheet/Safe/Loader.php b/src/Sheet/Safe/Loader.php index 16f67f4..bcea776 100644 --- a/src/Sheet/Safe/Loader.php +++ b/src/Sheet/Safe/Loader.php @@ -46,7 +46,8 @@ public function load(): \Generator ); } - while ($line) { + /* @phpstan-ignore-next-line */ + while (true) { try { $this->writer->addRow($this->orderColumns($headers, $line)); } catch (IOException|WriterNotOpenedException $exception) { @@ -56,6 +57,7 @@ public function load(): \Generator $exception, $line ); + continue; } $line = yield new AcceptanceResultBucket($line); From cb383c5820608f5bb544fff18119a7bd020d1807 Mon Sep 17 00:00:00 2001 From: sebprt Date: Wed, 22 Nov 2023 14:59:31 +0100 Subject: [PATCH 5/8] Updated phpstan and infection github actions --- .github/workflows/infection.yaml | 4 ++-- .github/workflows/phpstan-5.yaml | 26 -------------------------- .github/workflows/quality.yaml | 2 +- 3 files changed, 3 insertions(+), 29 deletions(-) delete mode 100644 .github/workflows/phpstan-5.yaml diff --git a/.github/workflows/infection.yaml b/.github/workflows/infection.yaml index c5adb1e..aacb82d 100644 --- a/.github/workflows/infection.yaml +++ b/.github/workflows/infection.yaml @@ -23,8 +23,8 @@ jobs: - name: Infection run: | - wget -q https://github.com/infection/infection/releases/download/0.26.18/infection.phar - wget -q https://github.com/infection/infection/releases/download/0.26.18/infection.phar.asc + wget -q https://github.com/infection/infection/releases/download/0.27.0/infection.phar + wget -q https://github.com/infection/infection/releases/download/0.27.0/infection.phar.asc chmod +x infection.phar ./infection.phar diff --git a/.github/workflows/phpstan-5.yaml b/.github/workflows/phpstan-5.yaml deleted file mode 100644 index 1d9e19f..0000000 --- a/.github/workflows/phpstan-5.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: PHPStan level 5 -on: push -jobs: - phpstan: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 - with: - path: '**/vendor' - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-composer- - - uses: php-actions/composer@v6 - with: - args: --prefer-dist - php_version: '8.2' - php_extensions: zip xdebug - - - name: PHPStan - uses: php-actions/phpstan@v3 - with: - path: src/ - level: 5 - php_version: '8.2' - php_extensions: zip xdebug diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml index c27d2d0..d713d22 100644 --- a/.github/workflows/quality.yaml +++ b/.github/workflows/quality.yaml @@ -34,6 +34,6 @@ jobs: uses: php-actions/phpstan@v3 with: path: src/ - level: 4 + level: 5 php_version: '8.2' php_extensions: zip xdebug From c77bdf0c18ff440c8aac6055f8a576b5ef1daa60 Mon Sep 17 00:00:00 2001 From: sebprt Date: Wed, 22 Nov 2023 14:59:31 +0100 Subject: [PATCH 6/8] Updated phpstan and infection github actions --- .github/workflows/phpstan-6.yaml | 2 +- .github/workflows/phpstan-7.yaml | 2 +- .github/workflows/phpstan-8.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/phpstan-6.yaml b/.github/workflows/phpstan-6.yaml index 57efd44..3362359 100644 --- a/.github/workflows/phpstan-6.yaml +++ b/.github/workflows/phpstan-6.yaml @@ -1,7 +1,7 @@ name: PHPStan level 6 on: push jobs: - phpstan: + phpstan-6: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/phpstan-7.yaml b/.github/workflows/phpstan-7.yaml index 1eacb3c..1a1a458 100644 --- a/.github/workflows/phpstan-7.yaml +++ b/.github/workflows/phpstan-7.yaml @@ -1,7 +1,7 @@ name: PHPStan level 7 on: push jobs: - phpstan: + phpstan-7: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/phpstan-8.yaml b/.github/workflows/phpstan-8.yaml index fa16164..417a3a7 100644 --- a/.github/workflows/phpstan-8.yaml +++ b/.github/workflows/phpstan-8.yaml @@ -1,7 +1,7 @@ name: PHPStan level 8 on: push jobs: - phpstan: + phpstan-8: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 From 014928f4eaf5c5118108d3e9f3b2d96d5df4c068 Mon Sep 17 00:00:00 2001 From: sebprt Date: Wed, 22 Nov 2023 14:59:31 +0100 Subject: [PATCH 7/8] Updated phpstan and infection github actions --- .github/workflows/quality.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/quality.yaml b/.github/workflows/quality.yaml index d713d22..4d49f4d 100644 --- a/.github/workflows/quality.yaml +++ b/.github/workflows/quality.yaml @@ -1,4 +1,4 @@ -name: Quality (PHPStan level 4) +name: Quality (PHPStan level 5) on: push jobs: cs-fixer: From 0b75422f195350a65c4733cafa4774c5b9f27a8e Mon Sep 17 00:00:00 2001 From: sebprt Date: Wed, 22 Nov 2023 15:26:43 +0100 Subject: [PATCH 8/8] Updated badges in the readme file --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ef4bf2c..351982c 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ This package brings tools to read and write into spreadsheet files from a pipeli [![Quality](https://github.com/php-etl/spreadsheet-flow/actions/workflows/quality.yaml/badge.svg)](https://github.com/php-etl/spreadsheet-flow/actions/workflows/quality.yaml) -[![PHPStan level 5](https://github.com/php-etl/spreadsheet-flow/actions/workflows/phpstan-5.yaml/badge.svg)](https://github.com/php-etl/spreadsheet-flow/actions/workflows/phpstan-5.yaml) +[![PHPStan level 6](https://github.com/php-etl/spreadsheet-flow/actions/workflows/phpstan-6.yaml/badge.svg)](https://github.com/php-etl/spreadsheet-flow/actions/workflows/phpstan-6.yaml) [![PHPStan level 7](https://github.com/php-etl/spreadsheet-flow/actions/workflows/phpstan-7.yaml/badge.svg)](https://github.com/php-etl/spreadsheet-flow/actions/workflows/phpstan-7.yaml) [![PHPStan level 8](https://github.com/php-etl/spreadsheet-flow/actions/workflows/phpstan-8.yaml/badge.svg)](https://github.com/php-etl/spreadsheet-flow/actions/workflows/phpstan-8.yaml) ![PHP](https://img.shields.io/packagist/php-v/php-etl/spreadsheet-flow)