mirror of
https://github.com/shivammathur/setup-php.git
synced 2026-06-16 13:18:43 +07:00
Add support for PHP7.4
This commit is contained in:
@@ -8,7 +8,7 @@ jobs:
|
|||||||
max-parallel: 6
|
max-parallel: 6
|
||||||
matrix:
|
matrix:
|
||||||
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
|
||||||
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3']
|
php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@master
|
||||||
@@ -27,4 +27,4 @@ jobs:
|
|||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extension-csv: "mbstring, curl, mysqli, json, xml, xdebug, pcov, phpdbg"
|
extension-csv: "mbstring, curl, mysqli, json, xml, xdebug, pcov, phpdbg"
|
||||||
- name: Testing
|
- name: Testing
|
||||||
run: php -m
|
run: php -v && composer -V && php -m
|
||||||
|
|||||||
@@ -13,6 +13,9 @@
|
|||||||
- 7.1
|
- 7.1
|
||||||
- 7.2
|
- 7.2
|
||||||
- 7.3
|
- 7.3
|
||||||
|
- 7.4 `7.4.0beta4` on `ubuntu`, and `7.4.0RC1` on `windows` and `macOS`
|
||||||
|
|
||||||
|
**Note:** PHP 7.4 is currently in development, do not use in production.
|
||||||
|
|
||||||
## OS Support
|
## OS Support
|
||||||
|
|
||||||
@@ -97,6 +100,7 @@ Contributions are welcome! See [Contributor's Guide](docs/contributors.md)
|
|||||||
- [Homebrew](https://brew.sh/)
|
- [Homebrew](https://brew.sh/)
|
||||||
- [ppa:ondrej/php](https://launchpad.net/~ondrej/+archive/ubuntu/php)
|
- [ppa:ondrej/php](https://launchpad.net/~ondrej/+archive/ubuntu/php)
|
||||||
- [exolnet/homebrew-deprecated](https://github.com/eXolnet/homebrew-deprecated)
|
- [exolnet/homebrew-deprecated](https://github.com/eXolnet/homebrew-deprecated)
|
||||||
|
- [phpbrew](https://github.com/phpbrew/phpbrew)
|
||||||
|
|
||||||
## Further Reading
|
## Further Reading
|
||||||
|
|
||||||
|
|||||||
@@ -104,9 +104,15 @@ function addExtension(extension_csv, version) {
|
|||||||
});
|
});
|
||||||
const response = yield http.get('https://pecl.php.net/package/' + extension);
|
const response = yield http.get('https://pecl.php.net/package/' + extension);
|
||||||
if (response.message.statusCode == 200) {
|
if (response.message.statusCode == 200) {
|
||||||
|
let extension_version = 'stable';
|
||||||
|
if (version == '7.4') {
|
||||||
|
extension_version = 'alpha';
|
||||||
|
}
|
||||||
windows +=
|
windows +=
|
||||||
'try { Install-PhpExtension ' +
|
'try { Install-PhpExtension ' +
|
||||||
extension +
|
extension +
|
||||||
|
' -MinimumStability ' +
|
||||||
|
extension_version +
|
||||||
' } catch [Exception] { echo $_; echo "Could not install extension: "' +
|
' } catch [Exception] { echo $_; echo "Could not install extension: "' +
|
||||||
extension +
|
extension +
|
||||||
' }\n';
|
' }\n';
|
||||||
@@ -161,6 +167,9 @@ function run() {
|
|||||||
version = core.getInput('php-version', { required: true });
|
version = core.getInput('php-version', { required: true });
|
||||||
}
|
}
|
||||||
console.log('Input: ' + version);
|
console.log('Input: ' + version);
|
||||||
|
if (version == '7.4') {
|
||||||
|
darwin = fs.readFileSync(path.join(__dirname, '../src/7.4.sh'), 'utf8');
|
||||||
|
}
|
||||||
let extension_csv = process.env['extension-csv'];
|
let extension_csv = process.env['extension-csv'];
|
||||||
if (!extension_csv) {
|
if (!extension_csv) {
|
||||||
extension_csv = core.getInput('extension-csv');
|
extension_csv = core.getInput('extension-csv');
|
||||||
|
|||||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-php",
|
"name": "setup-php",
|
||||||
"version": "1.1.2",
|
"version": "1.2.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||