Skip to content

Commit 705587d

Browse files
committed
install phan only for CI runs
1 parent b5b96c8 commit 705587d

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,19 @@ jobs:
8989
- name: Run psalm
9090
if: ${{ matrix.os != 'windows-latest' }}
9191
run: vendor/bin/psalm
92-
- name: Run phan
92+
- name: Install and run phan
9393
if: ${{ matrix.os != 'windows-latest' }}
94-
run: vendor/bin/phan
94+
run: |
95+
rm composer.lock
96+
composer require ${{ matrix.dependencies_level }} --dev phan/phan:^5.4.5
97+
vendor/bin/phan
9598
# AST 1.1 binary for Windows seems to be missing on PECL
96-
- name: Run phan with polyfill
99+
- name: Install and run phan with polyfill
97100
if: ${{ matrix.os == 'windows-latest' }}
98-
run: vendor/bin/phan --allow-polyfill-parser
101+
run: |
102+
rm composer.lock
103+
composer require ${{ matrix.dependencies_level }} --dev phan/phan:^5.4.5
104+
vendor/bin/phan --allow-polyfill-parser
99105
- name: Run tests with coverage
100106
if: ${{ matrix.os != 'windows-latest' && matrix.php_version == '8.1' && matrix.dependencies_level != '--prefer-lowest' }}
101107
run: php vendor/bin/phpunit --coverage-clover=coverage.xml --coverage-cobertura=cobertura.xml --log-junit=junit.xml

.phan/config.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
2222
'directory_list' => [
2323
'MO4',
2424
'tests',
25-
'vendor/squizlabs/php_codesniffer',
26-
'vendor/symfony/polyfill-php83',
25+
'vendor',
2726
],
2827

2928
// A directory list that defines files that will be excluded
@@ -38,6 +37,6 @@
3837
// should be added to both the `directory_list`
3938
// and `exclude_analysis_directory_list` arrays.
4039
"exclude_analysis_directory_list" => [
41-
'vendor/'
40+
'vendor/',
4241
],
4342
];

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"require-dev": {
3333
"ergebnis/composer-normalize": "^2.45",
3434
"nikic/php-parser": "< 5.0.1",
35-
"phan/phan": "^5.4.5",
3635
"phpstan/phpstan": "^2.0",
3736
"phpstan/phpstan-strict-rules": "^2.0",
3837
"phpunit/phpunit": "^9.6.15",

0 commit comments

Comments
 (0)