Skip to content

Commit 25f87e5

Browse files
committed
build: Skip Phan on PHP 8.5
Bug: T406326 Bug: T411213 Change-Id: I3db3f3e2eff1d9d9cb329e836f38158406cd47f8
1 parent 47f34f4 commit 25f87e5

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.github/workflows/php.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ jobs:
3737
os: ubuntu-latest
3838
- php: '8.4'
3939
os: ubuntu-latest
40+
- php: '8.5'
41+
os: ubuntu-latest
4042

4143
runs-on: ${{ matrix.os }}
4244

.phan/config.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
11
<?php
2+
3+
// NOTE: Automatically re-enable after each update unless someone updates
4+
// this str_contains check, to avoid forgetting and losing Phan coverage.
5+
$composerJson = file_get_contents( __DIR__ . '/../composer.json' );
6+
if (
7+
version_compare( PHP_VERSION, '8.5.0' ) >= 0
8+
&& str_contains( $composerJson, '"mediawiki/mediawiki-phan-config": "0.17.0"' )
9+
) {
10+
print "Skipping Phan on PHP 8.5. https://phabricator.wikimedia.org/T406326\n\n";
11+
exit( 0 );
12+
}
13+
214
return [
315

4-
'target_php_version' => '7.4',
16+
'target_php_version' => '8.1',
517

618
// A list of directories that should be parsed for class and
719
// method information. After excluding the directories

0 commit comments

Comments
 (0)