Skip to content

PHP

How json2vars-setter handles PHP, and how the example workflow provisions it.

json2vars-setter integration

Item Value
Matrix JSON key versions.php
Action output versions_php
Dynamic-update strategy input php-strategy (stable / latest / both)
Version source see Version Sources

Supported runners

The example matrix runs on Ubuntu / Windows / macOS:

ubuntu-latest, windows-latest, macos-latest

Any GitHub-hosted runner the setup action supports also works - the OS list is just the os array in your matrix JSON.

Supported versions

Example matrix (what the example workflow runs):

1
2
3
4
5
6
7
8
9
{
  "versions": {
    "php": [
      "8.2",
      "8.3",
      "8.4"
    ]
  }
}

Latest values tracked by the dynamic-update tooling (auto-refreshed from the release APIs into the version cache):

Field Version
stable 8.4.22
latest 8.5.7

Cache last updated: 2026-06-24T12:28:41.035845.

Setup action (example workflow)

php_test.yml provisions PHP with the matrix value json2vars-setter produced:

1
2
3
4
5
- name: Set up PHP
  uses: shivammathur/setup-php@2.37.2
  with:
    php-version: ${{ matrix.php-version }}
    tools: composer

References