Skip to content

Commit

Permalink
Merge branch '1.x' into feature/parquet-data-converter
Browse files Browse the repository at this point in the history
  • Loading branch information
norberttech authored Oct 24, 2023
2 parents 125b6de + 5040aec commit a88e1c2
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-mutations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ jobs:
run: "composer install --no-interaction --no-progress --no-suggest"

- name: "Mutation Tests"
run: "composer test:mutation"
run: "composer test:mutation -- --logger-github=false"
10 changes: 8 additions & 2 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,14 @@ jobs:
restore-keys: |
php-${{ matrix.php-version }}-cache-psalm-
- name: "Static Analyze"
run: "composer static:analyze"
- name: "Static Analyze - CS Fixer"
run: "composer static:analyze:cs-fixer"

- name: "Static Analyze - PHPStan"
run: "composer static:analyze:phpstan -- --error-format=github"

- name: "Static Analyze - Psalm"
run: "composer static:analyze:psalm -- --output-format=github"

tests:
name: "Tests"
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
- [#584](https://github.com/flow-php/flow/pull/584) - **Adjust `phpunit.xml` to be more efficient** - [@stloyd](https://github.com/stloyd)

### Fixed
- [#641](https://github.com/flow-php/flow/pull/641) - **Fix extracting data from empty Google Sheet.** - [@scyzoryck](https://github.com/scyzoryck)
- [#640](https://github.com/flow-php/flow/pull/640) - **bug in RLE/bitpacking hybrid algorithm** - [@norberttech](https://github.com/norberttech)
- [#606](https://github.com/flow-php/flow/pull/606) - **Fix wrong truncate in `ASCIIValue` class** - [@stloyd](https://github.com/stloyd)
- [#601](https://github.com/flow-php/flow/pull/601) - **benchmarks not executing extractors** - [@norberttech](https://github.com/norberttech)
Expand Down
13 changes: 11 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,17 @@
"tools/infection/vendor/bin/infection -j2"
],
"static:analyze": [
"tools/psalm/vendor/bin/psalm.phar --find-unused-psalm-suppress",
"tools/phpstan/vendor/bin/phpstan analyze -c phpstan.neon --memory-limit=-1",
"@static:analyze:cs-fixer",
"@static:analyze:psalm",
"@static:analyze:phpstan"
],
"static:analyze:psalm": [
"tools/psalm/vendor/bin/psalm.phar --find-unused-psalm-suppress"
],
"static:analyze:phpstan": [
"tools/phpstan/vendor/bin/phpstan analyze -c phpstan.neon --memory-limit=-1"
],
"static:analyze:cs-fixer": [
"tools/cs-fixer/vendor/bin/php-cs-fixer fix --dry-run"
],
"cs:php:fix": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,14 @@ public function extract(FlowContext $context) : \Generator
$totalRows = 0;
/** @var Sheets\ValueRange $response */
$response = $this->service->spreadsheets_values->get($this->spreadsheetId, $cellsRange->toString(), $this->options);
/** @var array[] $values */
$values = $response->getValues();
/**
* @var array[] $values
*
* @psalm-suppress RedundantConditionGivenDocblockType, DocblockTypeContradiction
*
* @phpstan-ignore-next-line
*/
$values = $response->getValues() ?? [];

if ($this->withHeader && [] !== $values) {
/** @var string[] $headers */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function test_works_for_no_data() : void
20
);
$ValueRangeMock = $this->createMock(Sheets\ValueRange::class);
$ValueRangeMock->method('getValues')->willReturn([]);
$ValueRangeMock->method('getValues')->willReturn(null);

$service->spreadsheets_values = ($spreadsheetsValues = $this->createMock(SpreadsheetsValues::class));
$spreadsheetsValues->method('get')->willReturn($ValueRangeMock);
Expand Down

0 comments on commit a88e1c2

Please sign in to comment.