diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1857535..39a0c1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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') }}" @@ -45,6 +45,8 @@ jobs: - 7.4 - 8.0 - 8.1 + - 8.2 + - 8.3 dependencies_level: - --prefer-lowest - "" @@ -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' }} @@ -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 @@ -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 diff --git a/README.md b/README.md index 29938a6..1f6f40e 100644 --- a/README.md +++ b/README.md @@ -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) diff --git a/composer.json b/composer.json index 1017d36..ad74497 100644 --- a/composer.json +++ b/composer.json @@ -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": {