Deprecate extension-csv and ini-values-csv inputs

This commit is contained in:
Shivam Mathur 2019-12-09 10:52:43 +05:30
parent 1cf6a369bb
commit e4fc767f9c
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A
24 changed files with 54 additions and 39 deletions

View File

@ -59,8 +59,8 @@ jobs:
run: node dist/index.js run: node dist/index.js
env: env:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xdebug, pcov #optional extensions: mbstring, xdebug, pcov #optional
ini-values-csv: post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata #optional ini-values: post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata #optional
- name: Testing PHP version - name: Testing PHP version
run: | run: |

View File

@ -57,8 +57,8 @@ jobs:
run: node dist/index.js run: node dist/index.js
env: env:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xdebug, pcov #optional extensions: mbstring, xdebug, pcov #optional
ini-values-csv: post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata #optional ini-values: post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata #optional
- name: Testing PHP version - name: Testing PHP version
run: | run: |

View File

@ -84,14 +84,14 @@ with:
Specify `coverage: pcov` to use `PCOV`. Specify `coverage: pcov` to use `PCOV`.
It is much faster than `Xdebug`. It is much faster than `Xdebug`.
`PCOV` needs `PHP >= 7.1`. `PCOV` needs `PHP >= 7.1`.
If your source code directory is other than `src`, `lib` or, `app`, specify `pcov.directory` using the `ini-values-csv` input. If your source code directory is other than `src`, `lib` or, `app`, specify `pcov.directory` using the `ini-values` input.
```yaml ```yaml
uses: shivammathur/setup-php@v1 uses: shivammathur/setup-php@v1
with: with:
php-version: '7.4' php-version: '7.4'
ini-values-csv: pcov.directory=api #optional, see above for usage. ini-values: pcov.directory=api #optional, see above for usage.
coverage: pcov coverage: pcov
``` ```
@ -116,8 +116,8 @@ with:
Inputs supported by this GitHub Action. Inputs supported by this GitHub Action.
- php-version `required` - php-version `required`
- extension-csv `optional` - extension `optional`
- ini-values-csv `optional` - ini-values `optional`
- coverage `optional` - coverage `optional`
- pecl `optional` - pecl `optional`
@ -134,8 +134,8 @@ steps:
uses: shivammathur/setup-php@v1 uses: shivammathur/setup-php@v1
with: with:
php-version: '7.4' php-version: '7.4'
extension-csv: mbstring, intl #optional, setup extensions extensions: mbstring, intl #optional, setup extensions
ini-values-csv: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration
coverage: xdebug #optional, setup coverage driver coverage: xdebug #optional, setup coverage driver
pecl: false #optional, setup PECL pecl: false #optional, setup PECL
``` ```
@ -159,8 +159,8 @@ jobs:
uses: shivammathur/setup-php@v1 uses: shivammathur/setup-php@v1
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, intl #optional, setup extensions extensions: mbstring, intl #optional, setup extensions
ini-values-csv: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration
coverage: xdebug #optional, setup coverage driver coverage: xdebug #optional, setup coverage driver
pecl: false #optional, setup PECL pecl: false #optional, setup PECL
``` ```

View File

@ -10,8 +10,8 @@ jest.mock('../src/install', () => ({
version: string, version: string,
os_version: string os_version: string
): Promise<string> => { ): Promise<string> => {
const extension_csv: string = process.env['extension-csv'] || ''; const extension_csv: string = process.env['extensions'] || '';
const ini_values_csv: string = process.env['ini-values-csv'] || ''; const ini_values_csv: string = process.env['ini-values'] || '';
const coverage_driver: string = process.env['coverage'] || ''; const coverage_driver: string = process.env['coverage'] || '';
let script = 'initial script ' + filename + version + os_version; let script = 'initial script ' + filename + version + os_version;
@ -77,8 +77,8 @@ function setEnv(
): void { ): void {
process.env['php-version'] = version; process.env['php-version'] = version;
process.env['RUNNER_OS'] = os; process.env['RUNNER_OS'] = os;
process.env['extension-csv'] = extension_csv; process.env['extensions'] = extension_csv;
process.env['ini-values-csv'] = ini_values_csv; process.env['ini-values'] = ini_values_csv;
process.env['coverage'] = coverage_driver; process.env['coverage'] = coverage_driver;
process.env['pecl'] = pecl; process.env['pecl'] = pecl;
} }

View File

@ -8,10 +8,10 @@ inputs:
description: 'Setup PHP version.' description: 'Setup PHP version.'
default: '7.4' default: '7.4'
required: true required: true
extension-csv: extensions:
description: 'Setup PHP extensions.' description: 'Setup PHP extensions.'
required: false required: false
ini-values-csv: ini-values:
description: 'Add values to php.ini.' description: 'Add values to php.ini.'
required: false required: false
coverage: coverage:
@ -20,6 +20,15 @@ inputs:
pecl: pecl:
description: 'Setup PECL on ubuntu' description: 'Setup PECL on ubuntu'
required: false required: false
# Deprecated options, do not use. Will not be supported after February 1, 2019.
extension-csv:
description: 'Deprecated! Use extensions instead.'
deprecationMessage: 'The extensions property will not be supported after February 1, 2020. Use extensions instead.'
required: false
ini-values-csv:
description: 'Deprecated! Use ini-values instead.'
deprecationMessage: 'The ini-values property will not be supported after February 1, 2020. Use ini-values instead.'
required: false
runs: runs:
using: 'node12' using: 'node12'
main: 'dist/index.js' main: 'dist/index.js'

6
dist/index.js vendored
View File

@ -1481,8 +1481,10 @@ const utils = __importStar(__webpack_require__(163));
function build(filename, version, os_version) { function build(filename, version, os_version) {
return __awaiter(this, void 0, void 0, function* () { return __awaiter(this, void 0, void 0, function* () {
// taking inputs // taking inputs
const extension_csv = yield utils.getInput('extension-csv', false); const extension_csv = (yield utils.getInput('extensions', false)) ||
const ini_values_csv = yield utils.getInput('ini-values-csv', false); (yield utils.getInput('extension-csv', false));
const ini_values_csv = (yield utils.getInput('ini-values', false)) ||
(yield utils.getInput('ini-values-csv', false));
const coverage_driver = yield utils.getInput('coverage', false); const coverage_driver = yield utils.getInput('coverage', false);
let script = yield utils.readScript(filename, version, os_version); let script = yield utils.readScript(filename, version, os_version);
if (extension_csv) { if (extension_csv) {

View File

@ -15,7 +15,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, intl, curl, dom extensions: mbstring, intl, curl, dom
coverage: xdebug #optional coverage: xdebug #optional
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache

View File

@ -39,7 +39,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, mysql extensions: mbstring, dom, fileinfo, mysql
coverage: xdebug #optional coverage: xdebug #optional
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache

View File

@ -41,7 +41,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, pgsql extensions: mbstring, dom, fileinfo, pgsql
coverage: xdebug #optional coverage: xdebug #optional
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache

View File

@ -17,7 +17,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo extensions: mbstring, dom, fileinfo
coverage: xdebug #optional coverage: xdebug #optional
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache

View File

@ -39,7 +39,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, mysql extensions: mbstring, dom, fileinfo, mysql
coverage: xdebug #optional coverage: xdebug #optional
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache

View File

@ -41,7 +41,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, pgsql extensions: mbstring, dom, fileinfo, pgsql
coverage: xdebug #optional coverage: xdebug #optional
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache

View File

@ -17,7 +17,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, mysql extensions: mbstring, dom, fileinfo, mysql
coverage: xdebug #optional coverage: xdebug #optional
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache

View File

@ -37,7 +37,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, zip, phalcon4, mysql #use phalcon3 for the phalcon 3.x. extensions: mbstring, dom, zip, phalcon4, mysql #use phalcon3 for the phalcon 3.x.
coverage: xdebug #optional coverage: xdebug #optional
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache

View File

@ -38,7 +38,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, zip, phalcon4, pgsql #use phalcon3 for the phalcon 3.x extensions: mbstring, dom, zip, phalcon4, pgsql #use phalcon3 for the phalcon 3.x
coverage: xdebug #optional coverage: xdebug #optional
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache

View File

@ -21,7 +21,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring extensions: mbstring
- name: Check node versions - name: Check node versions
run: node -v run: node -v
- name: Get yarn cache - name: Get yarn cache

View File

@ -15,7 +15,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, simplexml, dom extensions: mbstring, simplexml, dom
coverage: xdebug #optional coverage: xdebug #optional
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache

View File

@ -26,7 +26,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xml, ctype, iconv, mysql extensions: mbstring, xml, ctype, iconv, mysql
coverage: xdebug #optional coverage: xdebug #optional
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache

View File

@ -26,7 +26,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xml, ctype, iconv, pgsql extensions: mbstring, xml, ctype, iconv, pgsql
coverage: xdebug #optional coverage: xdebug #optional
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache

View File

@ -17,7 +17,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xml, ctype, iconv extensions: mbstring, xml, ctype, iconv
coverage: xdebug #optional coverage: xdebug #optional
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache

View File

@ -36,7 +36,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, intl, gd, imagick, zip, dom, mysql extensions: mbstring, intl, gd, imagick, zip, dom, mysql
coverage: xdebug #optional coverage: xdebug #optional
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache

View File

@ -36,7 +36,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, intl, gd, imagick, zip, dom, pgsql extensions: mbstring, intl, gd, imagick, zip, dom, pgsql
coverage: xdebug #optional coverage: xdebug #optional
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache

View File

@ -15,7 +15,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, bcmath, curl, intl extensions: mbstring, bcmath, curl, intl
coverage: xdebug #optional coverage: xdebug #optional
- name: Get composer cache directory - name: Get composer cache directory
id: composer-cache id: composer-cache

View File

@ -18,8 +18,12 @@ export async function build(
os_version: string os_version: string
): Promise<string> { ): Promise<string> {
// taking inputs // taking inputs
const extension_csv: string = await utils.getInput('extension-csv', false); const extension_csv: string =
const ini_values_csv: string = await utils.getInput('ini-values-csv', false); (await utils.getInput('extensions', false)) ||
(await utils.getInput('extension-csv', false));
const ini_values_csv: string =
(await utils.getInput('ini-values', false)) ||
(await utils.getInput('ini-values-csv', false));
const coverage_driver: string = await utils.getInput('coverage', false); const coverage_driver: string = await utils.getInput('coverage', false);
let script: string = await utils.readScript(filename, version, os_version); let script: string = await utils.readScript(filename, version, os_version);