Skip to content

Commit

Permalink
Fix and add lowest run
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Aug 10, 2024
1 parent e129b98 commit 6a126c2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
echo "chunks=$(php -r 'echo json_encode(range(1, ${{ env.CHUNK_COUNT }} ));')" >> $GITHUB_OUTPUT
tests:
name: "Unit Tests - PHP ${{ matrix.php-version }} ${{ matrix.chunk }}/${{ matrix.count }}"
name: "Unit Tests - PHP ${{ matrix.php-version }} ${{ matrix.dependencies }} ${{ matrix.chunk }}/${{ matrix.count }}"

runs-on: ubuntu-latest
needs:
Expand All @@ -129,8 +129,14 @@ jobs:
- "8.1"
- "8.2"
- "8.3"
dependencies: [highest]
count: ${{ fromJson(needs.chunk-matrix.outputs.count) }}
chunk: ${{ fromJson(needs.chunk-matrix.outputs.chunks) }}
include:
- php-version: 8.0
dependencies: lowest
count: ${{ fromJson(needs.chunk-matrix.outputs.count) }}
chunk: ${{ fromJson(needs.chunk-matrix.outputs.chunks) }}

env:
CHUNK_COUNT: "${{ matrix.count }}"
Expand Down
2 changes: 1 addition & 1 deletion src/Psalm/Internal/BCHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static function getPHPParserClassName(string $className): string

public static function usePHPParserV4(): bool
{
return class_exists('\PhpParser\Node\Stmt\Throw');
return class_exists('\PhpParser\Node\Stmt\Throw_');
}

public static function isThrow(Node $stmt): bool
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/SuicidalAutoloader/autoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
'PHPUnit\Framework\DOMElement',
'Stringable',
'AllowDynamicProperties',
'PhpParser\Node\Stmt\Throw', // BCHelper for nikic/php-parser v4/5
'PhpParser\Node\Stmt\Throw_', // BCHelper for nikic/php-parser v4/5

// https://github.com/symfony/symfony/pull/40203
// these are actually functions, referenced as `if (!function_exists(u::class))`
Expand Down

0 comments on commit 6a126c2

Please sign in to comment.