Skip to content

Commit 64b6538

Browse files
committed
install phan only for CI runs
1 parent ecae4d9 commit 64b6538

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,19 @@ jobs:
8888
run: vendor/bin/phpstan analyse --no-progress
8989
- name: Run psalm
9090
run: vendor/bin/psalm
91-
- name: Run phan
91+
- name: Install and run phan
9292
if: ${{ matrix.os != 'windows-latest' && matrix.php_version != '8.1' && matrix.php_version != '8.2' }}
93-
run: vendor/bin/phan
93+
run: |
94+
rm composer.lock
95+
composer require ${{ matrix.dependencies_level }} --dev phan/phan:^6.0.0
96+
vendor/bin/phan
9497
# AST 1.1 binary for Windows seems to be missing on PECL
95-
- name: Run phan with polyfill
98+
- name: Install and run phan with polyfill
9699
if: ${{ matrix.os == 'windows-latest' && matrix.php_version != '8.1' && matrix.php_version != '8.2' }}
97-
run: vendor/bin/phan --allow-polyfill-parser
100+
run: |
101+
rm composer.lock
102+
composer require ${{ matrix.dependencies_level }} --dev phan/phan:^6.0.0
103+
vendor/bin/phan --allow-polyfill-parser
98104
- name: Run tests with coverage
99105
if: ${{ matrix.os != 'windows-latest' && matrix.php_version == '8.1' && matrix.dependencies_level != '--prefer-lowest' }}
100106
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": "^6.0.0",
3635
"phpstan/phpstan": "^2.0",
3736
"phpstan/phpstan-strict-rules": "^2.0",
3837
"phpunit/phpunit": "^9.6.15",

0 commit comments

Comments
 (0)