File tree Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Expand file tree Collapse file tree 1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change 3535
3636## Usage
3737
38+ ### GitHub Actions
39+
40+ For generating PHP version matrix in GitHub Actions, use [ PHP Matrix Action] ( https://github.com/marketplace/actions/php-matrix ) .
41+
42+ <details >
43+
44+ <summary >Example</summary >
45+
46+ ``` yml
47+ name : Test
48+
49+ on :
50+ push :
51+
52+ jobs :
53+ php-matrix :
54+ runs-on : ubuntu-latest
55+ outputs :
56+ versions : ${{ steps.php-matrix.outputs.versions }}
57+ steps :
58+ - uses : actions/checkout@v5
59+ with :
60+ sparse-checkout : composer.json
61+ sparse-checkout-cone-mode : false
62+
63+ - uses : typisttech/php-matrix-action@v2
64+ id : php-matrix
65+
66+ test :
67+ runs-on : ubuntu-latest
68+ needs : php-matrix
69+ strategy :
70+ matrix :
71+ php-version : ${{ fromJSON(needs.php-matrix.outputs.versions) }}
72+ steps :
73+ - uses : actions/checkout@v5
74+ - uses : shivammathur/setup-php@v2
75+ with :
76+ php-version : ${{ matrix.php-version }}
77+ - run : composer install
78+ - run : composer test
79+ ` ` `
80+ </details>
81+
3882### List PHP versions that satisfy the required PHP constraint in ` composer.json`
3983
4084` ` ` console
You can’t perform that action at this time.
0 commit comments