@@ -17,11 +17,11 @@ jobs:
1717 strategy :
1818 matrix :
1919 php-version :
20- - " 8.2 "
20+ - " 8.4 "
2121
2222 steps :
2323 - name : " Checkout"
24- uses : " actions/checkout@v6 "
24+ uses : " actions/checkout@v7 "
2525
2626 - name : " Set up PHP"
2727 uses : " shivammathur/setup-php@v2"
4040 run : " echo \" COMPOSER_CACHE_DIR=$(composer config cache-dir)\" >> $GITHUB_ENV"
4141
4242 - name : " Cache dependencies installed with composer"
43- uses : " actions/cache@v5 "
43+ uses : " actions/cache@v6 "
4444 with :
4545 path : " ${{ env.COMPOSER_CACHE_DIR }}"
4646 key : " php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}"
@@ -62,11 +62,11 @@ jobs:
6262 strategy :
6363 matrix :
6464 php-version :
65- - " 8.2 "
65+ - " 8.4 "
6666
6767 steps :
6868 - name : " Checkout"
69- uses : " actions/checkout@v6 "
69+ uses : " actions/checkout@v7 "
7070
7171 - name : " Set up PHP"
7272 uses : " shivammathur/setup-php@v2"
8585 run : " echo \" COMPOSER_CACHE_DIR=$(composer config cache-dir)\" >> $GITHUB_ENV"
8686
8787 - name : " Cache dependencies installed with composer"
88- uses : " actions/cache@v5 "
88+ uses : " actions/cache@v6 "
8989 with :
9090 path : " ${{ env.COMPOSER_CACHE_DIR }}"
9191 key : " php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}"
@@ -107,6 +107,49 @@ jobs:
107107 - name : " Validate XML files"
108108 run : " for a in $(find . -name '*.xml'); do xmllint --quiet --noout $a; done"
109109
110+ static-analysis :
111+ name : " Static Analysis"
112+
113+ runs-on : " ubuntu-latest"
114+
115+ strategy :
116+ matrix :
117+ php-version :
118+ - " 8.4"
119+
120+ dependencies :
121+ - " locked"
122+
123+ steps :
124+ - name : " Checkout"
125+ uses : " actions/checkout@v7"
126+
127+ - name : " Set up PHP"
128+ uses : " shivammathur/setup-php@v2"
129+ with :
130+ coverage : " none"
131+ extensions : " none, curl, dom, json, mbstring, tokenizer, xml, xmlwriter, iconv"
132+ php-version : " ${{ matrix.php-version }}"
133+
134+ - name : " Set up problem matchers for PHP"
135+ run : " echo \" ::add-matcher::${{ runner.tool_cache }}/php.json\" "
136+
137+ - name : " Determine composer cache directory"
138+ run : " echo \" COMPOSER_CACHE_DIR=$(composer config cache-dir)\" >> $GITHUB_ENV"
139+
140+ - name : " Cache dependencies installed with composer"
141+ uses : " actions/cache@v6"
142+ with :
143+ path : " ${{ env.COMPOSER_CACHE_DIR }}"
144+ key : " php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}"
145+ restore-keys : " php-${{ matrix.php-version }}-composer-"
146+
147+ - name : " Install dependencies with composer"
148+ run : " composer install --ansi --no-interaction --no-progress"
149+
150+ - name : " Run static analysis"
151+ run : " vendor/bin/phpstan"
152+
110153 tests :
111154 name : " Tests"
112155
@@ -115,14 +158,14 @@ jobs:
115158 strategy :
116159 matrix :
117160 php-version :
118- - " 8.2 "
161+ - " 8.4 "
119162
120163 env :
121164 HTTP_HOST : " localhost:8080"
122165
123166 steps :
124167 - name : " Checkout"
125- uses : " actions/checkout@v6 "
168+ uses : " actions/checkout@v7 "
126169
127170 - name : " Set up PHP"
128171 uses : " shivammathur/setup-php@v2"
@@ -141,7 +184,7 @@ jobs:
141184 run : " echo \" COMPOSER_CACHE_DIR=$(composer config cache-dir)\" >> $GITHUB_ENV"
142185
143186 - name : " Cache dependencies installed with composer"
144- uses : " actions/cache@v5 "
187+ uses : " actions/cache@v6 "
145188 with :
146189 path : " ${{ env.COMPOSER_CACHE_DIR }}"
147190 key : " php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}"
0 commit comments