name: PHP formatting behavior on: pull_request: paths: - '**.php' - '.github/workflows/php-formatting-behavior.yml' permissions: contents: read jobs: behavior: if: contains(fromJSON('["fix/develop-sonar-web-lines","fix/develop-sonar-library-lines","fix/develop-sonar-poller-lines"]'), github.head_ref) name: Formatting preserves PHP behavior runs-on: ubuntu-24.04 timeout-minutes: 10 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with: fetch-depth: 0 persist-credentials: false - uses: ./.github/actions/setup-php-composer with: php-version: '8.3' dependency-mode: locked-formatting-behavior install-args: --prefer-dist --no-progress --no-interaction - name: Check formatting and literal preservation env: BASE_COMMIT: ${{ github.event.pull_request.base.sha }} run: | set -euo pipefail php tests/tools/check_php_formatting.php --self-test php tests/tools/check_php_formatting.php --base "$BASE_COMMIT"