Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ecosystem updates 2023 #208

Merged
merged 3 commits into from
Dec 13, 2023
Merged
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
30 changes: 19 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
- name: install dependencies
run: sudo apt update -qq && sudo apt -y install libxml2-utils
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: 'none'
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: '~/.cache/composer'
key: "cache-composer-${{ hashFiles('composer.json') }}"
Expand All @@ -45,6 +45,8 @@ jobs:
- 7.4
- 8.0
- 8.1
- 8.2
- 8.3
dependencies_level:
- --prefer-lowest
- ""
Expand All @@ -60,29 +62,29 @@ jobs:
git config --global core.autocrlf false
git config --global core.eol lf
- name: Check out repository code
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
coverage: 'xdebug'
php-version: ${{ matrix.php_version }}
extensions: ast-1.0.14
extensions: ast-1.1.1
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: '~/.cache/composer'
key: "cache-composer-${{ hashFiles('composer.json') }}"
restore-keys: 'cache-composer-'
- name: Run composer
if: ${{ matrix.php_version != '8.0' && matrix.php_version != '8.1' }}
if: ${{ matrix.php_version != '8.0' && matrix.php_version != '8.1' && matrix.php_version != '8.2' && matrix.php_version != '8.3' }}
run: composer update ${{ matrix.dependencies_level }} --prefer-dist --no-interaction --no-progress
- name: Run composer with workaround for PHP 8 and incompatible PHPUnit
if: ${{ matrix.php_version == '8.0' || matrix.php_version == '8.1' }}
if: ${{ matrix.php_version == '8.0' || matrix.php_version == '8.1' || matrix.php_version == '8.2' || matrix.php_version == '8.3' }}
run: composer update ${{ matrix.dependencies_level }} --ignore-platform-reqs --prefer-dist --no-interaction --no-progress
- name: Check composer.json
run: composer normalize --dry-run
- name: Run tests with coverage
if: ${{ matrix.php_version != '8.0' && matrix.php_version != '8.1' }}
if: ${{ matrix.php_version != '8.0' && matrix.php_version != '8.1' && matrix.php_version != '8.2' && matrix.php_version != '8.3' }}
run: php vendor/bin/phpunit --coverage-clover=coverage.xml
- name: Run tests
if: ${{ matrix.php_version == '8.0' }}
Expand All @@ -95,11 +97,17 @@ jobs:
- name: Run PHPStan
run: vendor/bin/phpstan analyse --no-progress
- name: Run psalm
if: ${{ matrix.os != 'windows-latest' }}
run: vendor/bin/psalm --show-info=true
- name: Run phan
if: ${{ matrix.os != 'windows-latest' }}
run: vendor/bin/phan
# AST 1.1 binary for Windows seems to be missing on PECL
- name: Run phan with polyfill
if: ${{ matrix.os == 'windows-latest' }}
run: vendor/bin/phan --allow-polyfill-parser
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v3
with:
verbose: true

Expand All @@ -108,10 +116,10 @@ jobs:
if: always()
runs-on: ubuntu-latest
steps:
- uses: technote-space/workflow-conclusion-action@v2
- uses: technote-space/workflow-conclusion-action@v3
- name: Post to a Slack channel
id: slack
uses: slackapi/slack-github-action@v1.17.0
uses: slackapi/slack-github-action@v1.23.0
with:
# Slack channel id, channel name, or user id to post message.
# See also: https://api.slack.com/methods/chat.postMessage#channels
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ If `phpcs` complains that MO4 is not installed, please check the installed codin

## Dependencies

* [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)
* [PHP CodeSniffer](https://github.com/phpcsstandards/PHP_CodeSniffer)
* [David Joos's Symfony Coding Standard](https://github.com/djoos/Symfony-coding-standard)
* [Composer installer for PHP_CodeSniffer coding standards](https://github.com/DealerDirect/phpcodesniffer-composer-installer)
* [Slevomat Coding Standard](https://github.com/slevomat/coding-standard)
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
},
"require-dev": {
"ergebnis/composer-normalize": ">=2.19 <2.30",
"phan/phan": "^5.1.0",
"phan/phan": "^5.4.2",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-strict-rules": "^1.0",
"phpunit/phpunit": "^7.0",
"psalm/plugin-phpunit": "^0.17",
"vimeo/psalm": "^4.5.2"
"psalm/plugin-phpunit": "^0.18",
"vimeo/psalm": "^4.30"
},
"config": {
"allow-plugins": {
Expand Down
Loading