Replace shivammathur/setup-php with php -v verification

PHP is pre-installed in custom runner image (moko/runner-image:latest).
shivammathur/setup-php is incompatible with Gitea act_runner DinD.
25 workflow templates updated.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jonathan Miller
2026-04-16 23:19:09 -05:00
parent 551307efed
commit fd66d46da3
25 changed files with 54 additions and 124 deletions
+2 -5
View File
@@ -41,11 +41,8 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up PHP
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
with:
php-version: '8.1'
extensions: mbstring, curl, json
tools: composer
run: |
php -v && composer --version
- name: Install Composer Dependencies
run: composer install --no-dev --optimize-autoloader
@@ -39,12 +39,8 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup PHP
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.31.0
with:
php-version: '8.2'
extensions: mbstring, xml, zip, gd, curl, json
tools: composer:v2
coverage: none
run: |
php -v && composer --version
- name: Clone MokoStandards
env:
@@ -267,12 +263,8 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.31.0
with:
php-version: ${{ matrix.php }}
extensions: mbstring, xml, zip, gd, curl, json
tools: composer:v2
coverage: none
run: |
php -v && composer --version
- name: Install dependencies
env:
@@ -133,10 +133,8 @@ jobs:
# PHP linting
- name: Setup PHP
if: steps.detect.outputs.type == 'php'
uses: shivammathur/setup-php@fcafdd6392932010c2bd5094439b8e33be2a8a09 # v2.37.0
with:
php-version: '8.2'
tools: composer, phpcs, php-cs-fixer, phpstan, psalm
run: |
php -v && composer --version
- name: Install PHP dependencies
if: steps.detect.outputs.type == 'php'
@@ -120,10 +120,8 @@ jobs:
- name: Setup PHP
if: ${{ hashFiles('composer.json') != '' }}
uses: shivammathur/setup-php@fcafdd6392932010c2bd5094439b8e33be2a8a09 # v2.37.0
with:
php-version: '8.1'
tools: composer:v2
run: |
php -v && composer --version
- name: Install Dependencies
if: ${{ hashFiles('composer.json') != '' }}
@@ -89,11 +89,8 @@ jobs:
- name: Setup PHP
if: env.PROJECT_TYPE == 'php'
uses: shivammathur/setup-php@fcafdd6392932010c2bd5094439b8e33be2a8a09 # v2.37.0
with:
php-version: '8.2'
coverage: xdebug
tools: composer:v2
run: |
php -v && composer --version
- name: Setup Go
if: env.PROJECT_TYPE == 'go'
+2 -5
View File
@@ -46,11 +46,8 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up PHP
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
with:
php-version: '8.1'
extensions: mbstring, curl, json
tools: composer
run: |
php -v && composer --version
- name: Install Composer Dependencies
run: composer install --no-dev --optimize-autoloader
+2 -5
View File
@@ -47,11 +47,8 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up PHP
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
with:
php-version: '8.1'
extensions: mbstring, curl, json
tools: composer
run: |
php -v && composer --version
- name: Install Composer Dependencies
run: composer install --no-dev --optimize-autoloader
@@ -39,12 +39,8 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup PHP
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.31.0
with:
php-version: '8.2'
extensions: mbstring, xml, zip, gd, curl, json, simplexml
tools: composer:v2
coverage: none
run: |
php -v && composer --version
- name: Clone MokoStandards
env:
@@ -346,12 +342,8 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.31.0
with:
php-version: ${{ matrix.php }}
extensions: mbstring, xml, zip, gd, curl, json, simplexml
tools: composer:v2
coverage: none
run: |
php -v && composer --version
- name: Install dependencies
env:
@@ -39,12 +39,8 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Setup PHP
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.31.0
with:
php-version: '8.2'
extensions: json, ssh2
tools: composer
coverage: none
run: |
php -v && composer --version
- name: Setup MokoStandards tools
env:
+2 -5
View File
@@ -45,11 +45,8 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up PHP
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
with:
php-version: '8.1'
extensions: mbstring, curl, json
tools: composer
run: |
php -v && composer --version
- name: Install Composer Dependencies
run: composer install --no-dev --optimize-autoloader
+2 -5
View File
@@ -53,11 +53,8 @@ jobs:
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up PHP
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
with:
php-version: '8.1'
extensions: mbstring, curl, json
tools: composer
run: |
php -v && composer --version
- name: Install Composer Dependencies
run: composer install --no-dev --optimize-autoloader
@@ -398,10 +398,8 @@ jobs:
- name: Setup PHP
if: steps.source.outputs.skip == 'false' && steps.remote.outputs.skip != 'true'
uses: shivammathur/setup-php@fcafdd6392932010c2bd5094439b8e33be2a8a09 # v2.37.0
with:
php-version: '8.1'
tools: composer
run: |
php -v && composer --version
- name: Setup MokoStandards deploy tools
if: steps.source.outputs.skip == 'false' && steps.remote.outputs.skip != 'true'
@@ -397,10 +397,8 @@ jobs:
- name: Setup PHP
if: steps.source.outputs.skip == 'false' && steps.remote.outputs.skip != 'true'
uses: shivammathur/setup-php@fcafdd6392932010c2bd5094439b8e33be2a8a09 # v2.37.0
with:
php-version: '8.1'
tools: composer
run: |
php -v && composer --version
- name: Setup MokoStandards deploy tools
if: steps.source.outputs.skip == 'false' && steps.remote.outputs.skip != 'true'
@@ -394,10 +394,8 @@ jobs:
- name: Setup PHP
if: steps.source.outputs.skip == 'false' && steps.remote.outputs.skip != 'true'
uses: shivammathur/setup-php@fcafdd6392932010c2bd5094439b8e33be2a8a09 # v2.37.0
with:
php-version: '8.1'
tools: composer
run: |
php -v && composer --version
- name: Setup MokoStandards deploy tools
if: steps.source.outputs.skip == 'false' && steps.remote.outputs.skip != 'true'
@@ -50,10 +50,8 @@ jobs:
fetch-depth: 0
- name: Set up PHP
uses: shivammathur/setup-php@fcafdd6392932010c2bd5094439b8e33be2a8a09 # v2.37.0
with:
php-version: '8.1'
tools: composer
run: |
php -v && composer --version
- name: Setup MokoStandards tools
env:
+2 -4
View File
@@ -24,10 +24,8 @@ jobs:
ref: main
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, json, fileinfo
run: |
php -v && composer --version
- name: Install MokoStandards dependencies
working-directory: .mokostandards
@@ -24,10 +24,8 @@ jobs:
ref: main
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, json, fileinfo
run: |
php -v && composer --version
- name: Install MokoStandards dependencies
working-directory: .mokostandards
@@ -24,10 +24,8 @@ jobs:
ref: main
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, xml, json, fileinfo, zip, mysqli
run: |
php -v && composer --version
- name: Install MokoStandards dependencies
working-directory: .mokostandards
@@ -24,10 +24,8 @@ jobs:
ref: main
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, json, fileinfo
run: |
php -v && composer --version
- name: Install MokoStandards dependencies
working-directory: .mokostandards
@@ -27,10 +27,8 @@ jobs:
ref: main
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, xml, json, fileinfo, zip
run: |
php -v && composer --version
- name: Install MokoStandards dependencies
working-directory: .mokostandards
@@ -24,10 +24,8 @@ jobs:
ref: main
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, json, fileinfo
run: |
php -v && composer --version
- name: Install MokoStandards dependencies
working-directory: .mokostandards
@@ -32,10 +32,8 @@ jobs:
cache: 'npm'
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, json, fileinfo
run: |
php -v && composer --version
- name: Install MokoStandards dependencies
working-directory: .mokostandards
@@ -32,10 +32,8 @@ jobs:
cache: 'pip'
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, json, fileinfo
run: |
php -v && composer --version
- name: Install MokoStandards dependencies
working-directory: .mokostandards
@@ -29,10 +29,8 @@ jobs:
terraform_version: '1.6.0'
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, json, fileinfo
run: |
php -v && composer --version
- name: Install MokoStandards dependencies
working-directory: .mokostandards
@@ -26,10 +26,8 @@ jobs:
ref: main
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
extensions: mbstring, xml, json, fileinfo, zip, mysqli
run: |
php -v && composer --version
- name: Install MokoStandards dependencies
working-directory: .mokostandards