File: phpstan.yml

package info (click to toggle)
composer 2.9.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,476 kB
  • sloc: php: 82,636; makefile: 59; xml: 39
file content (67 lines) | stat: -rw-r--r-- 2,120 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: "PHPStan"

on:
  push:
    paths-ignore:
      - 'doc/**'
  pull_request:
    paths-ignore:
      - 'doc/**'

env:
  COMPOSER_FLAGS: "--ansi --no-interaction --prefer-dist"
  SYMFONY_PHPUNIT_VERSION: ""

permissions:
  contents: read

jobs:
  tests:
    name: "PHPStan"

    runs-on: ubuntu-latest
    continue-on-error: ${{ matrix.experimental }}

    strategy:
      matrix:
        include:
          - php-version: "7.2"
            experimental: false
          - php-version: "8.4"
            experimental: true
      fail-fast: false

    steps:
      - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

      - uses: shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 # 2.36.0
        with:
          coverage: "none"
          extensions: "intl, zip"
          ini-values: "memory_limit=-1"
          php-version: "${{ matrix.php-version }}"

      - name: "Determine composer cache directory"
        id: "determine-composer-cache-directory"
        run: "echo \"directory=$(composer config cache-dir)\" >> $GITHUB_OUTPUT"

      - name: "Cache dependencies installed with composer"
        uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5.0.1
        with:
          path: "${{ steps.determine-composer-cache-directory.outputs.directory }}"
          key: "php-${{ matrix.php-version }}-symfony-php-unit-version-${{ env.SYMFONY_PHPUNIT_VERSION }}-${{ hashFiles('**/composer.lock') }}"
          restore-keys: "php-${{ matrix.php-version }}-symfony-php-unit-version-${{ env.SYMFONY_PHPUNIT_VERSION }}"

      - name: "Install highest dependencies"
        if: "matrix.experimental == true"
        run: "composer config platform --unset && composer update ${{ env.COMPOSER_FLAGS }}"

      - name: "Install locked dependencies"
        if: "matrix.experimental == false"
        run: "composer config platform --unset && composer install ${{ env.COMPOSER_FLAGS }}"

      - name: "Initialize PHPUnit sources"
        run: "vendor/bin/simple-phpunit --filter NO_TEST_JUST_AUTOLOAD_THANKS"

      - name: "Run PHPStan"
        run: "composer phpstan"