Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.0, 8.1, 8.2, 8.3, 8.4, 8.5]
# PHP v8.5 has issues with Phan 5.5.1
# Method SplObjectStorage::attach() is deprecated since 8.5, use method SplObjectStorage::offsetSet() instead
php: [8.1, 8.2, 8.3, 8.4]
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -23,13 +25,11 @@ jobs:
- name: Running phpcs
run: composer run-script cs

# The yaml-sort-checker library requires PHP 8.1 or higher,
# but we want to support older PHP versions,
# so we install the library here
# and not using composer.json
- name: Running yaml-sort-checker
if: ${{ matrix.php >= '8.1' }}
run: composer run-script yaml-sort-check

- name: Run tests
run: php ./vendor/bin/phpunit

- name: Running phan
run: composer run-script phan
2 changes: 2 additions & 0 deletions .phan/config.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
return require __DIR__ . '/../vendor/mediawiki/mediawiki-phan-config/src/config.php';
15 changes: 10 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,15 @@
}
],
"require": {
"php": ">=8.0"
"php": ">=8.1"
},
"require-dev": {
"ext-curl": "*",
"phpunit/phpunit": "9.6.20",
"mediawiki/mediawiki-codesniffer": "47.0.0",
"mustangostang/spyc": "0.6.3"
"mediawiki/mediawiki-codesniffer": "48.0.0",
"mediawiki/mediawiki-phan-config": "0.17.0",
"mustangostang/spyc": "0.6.3",
"mhujer/yaml-sort-checker": "1.5.0"
},

"support": {
Expand All @@ -53,19 +55,22 @@
"scripts": {
"fix": "phpcbf",
"cs": "phpcs -sp",
"phan": "phan -d . --long-progress-bar",
"yaml-sort-check": "composer require mhujer/yaml-sort-checker; yaml-sort-checker",
"test": [
"@composer validate --no-interaction",
"phpunit",
"@cs"
"@cs",
"@phan",
"@yaml-sort-check"
]
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
},
"platform": {
"php": "8.0"
"php": "8.1"
}
}
}
Loading