Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork3
GitHub Action that gets the PHP versions in range from composer.json
License
WyriHaximus/github-action-composer-php-versions-in-range
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
GitHub Action that gets the PHP versions in range from composer.json
This action supports the following option.
Will include the next upcoming major or minor PHP release. For example, if enabled at the time of writing (May 2022)that will be8.2. Note that this version will be updated once the first alpha is out. Looking for more bleedingedge,nightly will hold the same value from the release day of the previousX.Y.0 release.
- Required:
No - Type:
Boolean - Default:
false - Example:
truefor including upcoming new major or minor releases
Will include the nightly of the next new major or minor PHP release. For example, if enabled at the time of writing (December 2023)that will be8.4.
- Required:
No - Type:
Boolean - Default:
false - Example:
truefor including the nightly of the next new major or minor releases
Set a different than the root directory to look forcomposer.json
- Required:
No - Type:
String - Default:
"" - Example:
clients/GitHub
The action comes with 7 outputs, most importantlyversion which contains a JSON list with versions to be used infollow up steps:
["7.3","7.4","8.0","8.1","8.2","8.3","8.4"]
And thehighest andlowest outputs that provide the highest PHP version (8.4 in theversion output example)and the lowest PHP version (7.3 in theversion output example) from theversion list. The 4rth output isupcoming and will be populated with the upcoming but in alpha/beta/rc next minor or major version of PHP. Thenightly contains the current in development but not alpha/beta/rc tag next major or minor version.
On top of that this action will also give you 3 lists of extensions. The extensions fromrequire inrequiredExtensions, dev extensions inrequiredDevExtensions, and a combined list inextensions.
This example will get the supported PHP version fromcomposer.json and run tests of all those version:
name:CIon:push:pull_request:jobs:supported-versions-matrix:name:Supported Versions Matrixruns-on:ubuntu-latestoutputs:extensions:${{ steps.supported-versions-matrix.outputs.extensions }}version:${{ steps.supported-versions-matrix.outputs.version }}steps: -uses:actions/checkout@v3 -id:supported-versions-matrixuses:WyriHaximus/github-action-composer-php-versions-in-range@v1tests:name:PHP ${{ matrix.php }} Latestruns-on:ubuntu-latestneeds: -supported-versions-matrixstrategy:matrix:php:${{ fromJson(needs.supported-versions-matrix.outputs.version) }}steps: -name:Checkout codeuses:actions/checkout@v3 -name:Setup PHPuses:shivammathur/setup-php@v2with:php-version:${{ matrix.php }}tools:composercoverage:noneextensions:${{ join(fromJson(needs.supported-versions-matrix.outputs.extensions), ',') }} -name:Install dependenciesuses:ramsey/composer-install@v2 -name:Execute testsrun:composer test
Copyright 2024Cees-Jan Kiewiet
Permission is hereby granted, free of charge, to any personobtaining a copy of this software and associated documentationfiles (the "Software"), to deal in the Software withoutrestriction, including without limitation the rights to use,copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom theSoftware is furnished to do so, subject to the followingconditions:
The above copyright notice and this permission notice shall beincluded in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIESOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ANDNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHTHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OROTHER DEALINGS IN THE SOFTWARE.
About
GitHub Action that gets the PHP versions in range from composer.json
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors7
Uh oh!
There was an error while loading.Please reload this page.