Update PHPStan packages to v2 (major) #1012
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Backwards compatibility check" | |
on: | |
pull_request: | |
jobs: | |
bc-check: | |
name: "Backwards compatibility check" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Checkout" | |
uses: "actions/[email protected]" | |
with: | |
fetch-depth: 0 | |
- name: "Install PHP" | |
uses: "shivammathur/[email protected]" | |
with: | |
php-version: "8.2" | |
ini-values: memory_limit=-1 | |
tools: composer:v2, cs2pr | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "composer_cache_dir=$(composer global config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: "Cache dependencies" | |
uses: "actions/[email protected]" | |
with: | |
path: ${{ steps.composer-cache.outputs.composer_cache_dir }} | |
key: "php-8.2-bc-break-check-${{ hashFiles('.github/workflows/backwards-compatibility.yml') }}" | |
restore-keys: "php-8.2-bc-break-check-" | |
# Only necessary until https://github.com/Roave/BackwardCompatibilityCheck/pull/737 gets resolved | |
- name: "Configure custom repository" | |
run: | | |
echo '{"repositories": [{"type":"vcs","url":"[email protected]:lcobucci/BackwardCompatibilityCheck.git"}]}' > ~/.composer/composer.json | |
- name: "Install dependencies" | |
# run: composer global require roave/backward-compatibility-check | |
run: composer global require "roave/backward-compatibility-check:dev-support-baseline-configuration" | |
- name: "BC Check" | |
run: | | |
~/.composer/vendor/bin/roave-backward-compatibility-check --from=${{ github.event.pull_request.base.sha }} --format=github-actions |