@@ -12,6 +12,9 @@ concurrency:
1212 group : build-${{ github.head_ref || github.run_id }} # will be canceled on subsequent pushes in pull requests but not branches
1313 cancel-in-progress : true
1414
15+ permissions :
16+ contents : read
17+
1518jobs :
1619 lint :
1720 name : " Lint"
3740
3841 - name : " Checkout"
3942 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
43+ with :
44+ persist-credentials : false
4045
4146 - name : " Install PHP"
4247 uses : " shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962" # v2
@@ -66,10 +71,13 @@ jobs:
6671
6772 - name : " Checkout"
6873 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
74+ with :
75+ persist-credentials : false
6976
7077 - name : " Checkout build-cs"
7178 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
7279 with :
80+ persist-credentials : false
7381 repository : " phpstan/build-cs"
7482 path : " build-cs"
7583 ref : " 2.x"
@@ -148,6 +156,8 @@ jobs:
148156
149157 - name : " Checkout"
150158 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
159+ with :
160+ persist-credentials : false
151161
152162 - name : " Install PHP"
153163 uses : " shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962" # v2
@@ -156,7 +166,9 @@ jobs:
156166 php-version : " ${{ matrix.php-version }}"
157167
158168 - name : " Require specific PHPUnit version"
159- run : " composer require --dev phpunit/phpunit:${{ matrix.phpunit-version }}"
169+ env :
170+ PHPUNIT_VERSION : ${{ matrix.phpunit-version }}
171+ run : composer require --dev "phpunit/phpunit:$PHPUNIT_VERSION"
160172
161173 - name : " Install lowest dependencies"
162174 if : ${{ matrix.dependencies == 'lowest' }}
@@ -221,6 +233,8 @@ jobs:
221233
222234 - name : " Checkout"
223235 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
236+ with :
237+ persist-credentials : false
224238
225239 - name : " Install PHP"
226240 uses : " shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962" # v2
@@ -231,7 +245,9 @@ jobs:
231245 tools : composer:v2
232246
233247 - name : " Require specific PHPUnit version"
234- run : " composer require --dev phpunit/phpunit:${{ matrix.phpunit-version }}"
248+ env :
249+ PHPUNIT_VERSION : ${{ matrix.phpunit-version }}
250+ run : composer require --dev "phpunit/phpunit:$PHPUNIT_VERSION"
235251
236252 - name : " Install lowest dependencies"
237253 if : ${{ matrix.dependencies == 'lowest' }}
@@ -266,15 +282,19 @@ jobs:
266282
267283 - name : " Checkout"
268284 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
285+ with :
286+ persist-credentials : false
269287
270288 - name : " Checkout build-infection"
271289 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
272290 with :
291+ persist-credentials : false
273292 repository : " phpstan/build-infection"
274293 path : " build-infection"
275294 ref : " 1.x"
276295
277- - uses : ./build-infection/.github/actions/setup-php
296+ # The action comes from the phpstan/build-infection checkout above, which the $/ self-repository syntax cannot load
297+ - uses : ./build-infection/.github/actions/setup-php # zizmor: ignore[self-repository]
278298 with :
279299 php-version : " ${{ matrix.php-version }}"
280300 php-extensions : mbstring
@@ -334,14 +354,16 @@ jobs:
334354
335355 - name : " Checkout"
336356 uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
357+ with :
358+ persist-credentials : false
337359
338360 - name : " Install PHP"
339361 uses : " shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962" # v2
340362 with :
341363 coverage : " none"
342364 php-version : " 8.5"
343365
344- - uses : " ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # v4 .0.0
366+ - uses : " ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # 4 .0.0
345367
346368 - name : " Name Collision Detector"
347369 run : " make name-collision"
0 commit comments