Skip to content

Commit c7dc8b9

Browse files
committed
Update Setup PHP in GitHub Actions to 2.35.5
1 parent c290f8c commit c7dc8b9

File tree

5 files changed

+31
-19
lines changed

5 files changed

+31
-19
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Setup PHP
2+
3+
inputs:
4+
php-version:
5+
description: 'PHP version to setup'
6+
required: false
7+
default: '8.4'
8+
extensions:
9+
description: 'Comma-separated list of PHP extensions to install'
10+
required: false
11+
default: 'mbstring, json, bcmath, zip, pdo, pdo_mysql, pdo_pgsql, pdo_sqlite, exif, gd, ldap, fileinfo'
12+
tools:
13+
description: 'Comma-separated list of tools to install'
14+
required: false
15+
default: composer:2.8.12, phan:5.5.1
16+
17+
runs:
18+
using: "composite"
19+
steps:
20+
- name: Setup PHP
21+
uses: shivammathur/setup-php@bf6b4fbd49ca58e4608c9c89fba0b8d90bd2a39f # v2.35.5
22+
with:
23+
php-version: ${{ inputs.php-version }}
24+
coverage: none
25+
extensions: ${{ inputs.extensions }}
26+
tools: ${{ inputs.tools }}

.github/workflows/phan.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ jobs:
1515
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1616

1717
- name: Setup PHP
18-
uses: shivammathur/setup-php@ec406be512d7077f68eed36e63f4d91bc006edc4 # v2.35.4
19-
with:
20-
php-version: '8.4'
21-
tools: phan:5.5.1
22-
coverage: none
18+
uses: ./.github/actions/setup-php
2319

2420
- name: Restore cached baseline for Phan
2521
id: cache-baseline-restore

.github/workflows/php.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ jobs:
1414
test:
1515
name: Test
1616
runs-on: ${{ matrix.os }}
17-
env:
18-
PHP_EXTENSIONS: mbstring, json, bcmath, zip, pdo, pdo_mysql, pdo_pgsql, pdo_sqlite, exif, gd, ldap, fileinfo
1917
strategy:
2018
matrix:
2119
# https://github.com/shivammathur/setup-php?tab=readme-ov-file#cloud-osplatform-support
@@ -25,12 +23,10 @@ jobs:
2523
- name: Checkout
2624
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2725

28-
- name: Install PHP with extensions
29-
uses: shivammathur/setup-php@ec406be512d7077f68eed36e63f4d91bc006edc4 # v2.35.4
26+
- name: Setup PHP
27+
uses: ./.github/actions/setup-php
3028
with:
3129
php-version: ${{ matrix.php-version }}
32-
coverage: none
33-
extensions: ${{ env.PHP_EXTENSIONS }}
3430

3531
- name: Prepare environment
3632
run: composer update

.github/workflows/phpstan.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ jobs:
2020
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
2121

2222
- name: Setup PHP
23-
uses: shivammathur/setup-php@ec406be512d7077f68eed36e63f4d91bc006edc4 # v2.35.4
24-
with:
25-
php-version: '8.4'
23+
uses: ./.github/actions/setup-php
2624

2725
- name: Install PHPStan
2826
run: composer install

.github/workflows/save-baseline.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ jobs:
1616
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
1717

1818
- name: Setup PHP
19-
uses: shivammathur/setup-php@ec406be512d7077f68eed36e63f4d91bc006edc4 # v2.35.4
20-
with:
21-
php-version: '8.4'
22-
tools: phan
23-
coverage: none
19+
uses: ./.github/actions/setup-php
2420

2521
- name: Install PHPStan
2622
run: composer install

0 commit comments

Comments
 (0)