Skip to content

Commit

Permalink
Deprecate extension-csv and ini-values-csv inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Dec 9, 2019
1 parent 1cf6a36 commit e4fc767
Show file tree
Hide file tree
Showing 24 changed files with 54 additions and 39 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/experimental-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ jobs:
run: node dist/index.js
env:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xdebug, pcov #optional
ini-values-csv: post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata #optional
extensions: mbstring, xdebug, pcov #optional
ini-values: post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata #optional

- name: Testing PHP version
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ jobs:
run: node dist/index.js
env:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xdebug, pcov #optional
ini-values-csv: post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata #optional
extensions: mbstring, xdebug, pcov #optional
ini-values: post_max_size=256M, short_open_tag=On, date.timezone=Asia/Kolkata #optional

- name: Testing PHP version
run: |
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ with:
Specify `coverage: pcov` to use `PCOV`.
It is much faster than `Xdebug`.
`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
uses: shivammathur/setup-php@v1
with:
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
```

Expand All @@ -116,8 +116,8 @@ with:
Inputs supported by this GitHub Action.

- php-version `required`
- extension-csv `optional`
- ini-values-csv `optional`
- extension `optional`
- ini-values `optional`
- coverage `optional`
- pecl `optional`

Expand All @@ -134,8 +134,8 @@ steps:
uses: shivammathur/setup-php@v1
with:
php-version: '7.4'
extension-csv: mbstring, intl #optional, setup extensions
ini-values-csv: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration
extensions: mbstring, intl #optional, setup extensions
ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration
coverage: xdebug #optional, setup coverage driver
pecl: false #optional, setup PECL
```
Expand All @@ -159,8 +159,8 @@ jobs:
uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, intl #optional, setup extensions
ini-values-csv: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration
extensions: mbstring, intl #optional, setup extensions
ini-values: post_max_size=256M, short_open_tag=On #optional, setup php.ini configuration
coverage: xdebug #optional, setup coverage driver
pecl: false #optional, setup PECL
```
Expand Down
8 changes: 4 additions & 4 deletions __tests__/install.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jest.mock('../src/install', () => ({
version: string,
os_version: string
): Promise<string> => {
const extension_csv: string = process.env['extension-csv'] || '';
const ini_values_csv: string = process.env['ini-values-csv'] || '';
const extension_csv: string = process.env['extensions'] || '';
const ini_values_csv: string = process.env['ini-values'] || '';
const coverage_driver: string = process.env['coverage'] || '';

let script = 'initial script ' + filename + version + os_version;
Expand Down Expand Up @@ -77,8 +77,8 @@ function setEnv(
): void {
process.env['php-version'] = version;
process.env['RUNNER_OS'] = os;
process.env['extension-csv'] = extension_csv;
process.env['ini-values-csv'] = ini_values_csv;
process.env['extensions'] = extension_csv;
process.env['ini-values'] = ini_values_csv;
process.env['coverage'] = coverage_driver;
process.env['pecl'] = pecl;
}
Expand Down
13 changes: 11 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ inputs:
description: 'Setup PHP version.'
default: '7.4'
required: true
extension-csv:
extensions:
description: 'Setup PHP extensions.'
required: false
ini-values-csv:
ini-values:
description: 'Add values to php.ini.'
required: false
coverage:
Expand All @@ -20,6 +20,15 @@ inputs:
pecl:
description: 'Setup PECL on ubuntu'
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:
using: 'node12'
main: 'dist/index.js'
6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1481,8 +1481,10 @@ const utils = __importStar(__webpack_require__(163));
function build(filename, version, os_version) {
return __awaiter(this, void 0, void 0, function* () {
// taking inputs
const extension_csv = yield utils.getInput('extension-csv', false);
const ini_values_csv = yield utils.getInput('ini-values-csv', false);
const extension_csv = (yield utils.getInput('extensions', 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);
let script = yield utils.readScript(filename, version, os_version);
if (extension_csv) {
Expand Down
2 changes: 1 addition & 1 deletion examples/codeigniter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, intl, curl, dom
extensions: mbstring, intl, curl, dom
coverage: xdebug #optional
- name: Get composer cache directory
id: composer-cache
Expand Down
2 changes: 1 addition & 1 deletion examples/laravel-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, mysql
extensions: mbstring, dom, fileinfo, mysql
coverage: xdebug #optional
- name: Get composer cache directory
id: composer-cache
Expand Down
2 changes: 1 addition & 1 deletion examples/laravel-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, pgsql
extensions: mbstring, dom, fileinfo, pgsql
coverage: xdebug #optional
- name: Get composer cache directory
id: composer-cache
Expand Down
2 changes: 1 addition & 1 deletion examples/laravel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo
extensions: mbstring, dom, fileinfo
coverage: xdebug #optional
- name: Get composer cache directory
id: composer-cache
Expand Down
2 changes: 1 addition & 1 deletion examples/lumen-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, mysql
extensions: mbstring, dom, fileinfo, mysql
coverage: xdebug #optional
- name: Get composer cache directory
id: composer-cache
Expand Down
2 changes: 1 addition & 1 deletion examples/lumen-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, pgsql
extensions: mbstring, dom, fileinfo, pgsql
coverage: xdebug #optional
- name: Get composer cache directory
id: composer-cache
Expand Down
2 changes: 1 addition & 1 deletion examples/lumen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, dom, fileinfo, mysql
extensions: mbstring, dom, fileinfo, mysql
coverage: xdebug #optional
- name: Get composer cache directory
id: composer-cache
Expand Down
2 changes: 1 addition & 1 deletion examples/phalcon-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with:
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
- name: Get composer cache directory
id: composer-cache
Expand Down
2 changes: 1 addition & 1 deletion examples/phalcon-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with:
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
- name: Get composer cache directory
id: composer-cache
Expand Down
2 changes: 1 addition & 1 deletion examples/sage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring
extensions: mbstring
- name: Check node versions
run: node -v
- name: Get yarn cache
Expand Down
2 changes: 1 addition & 1 deletion examples/slim-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, simplexml, dom
extensions: mbstring, simplexml, dom
coverage: xdebug #optional
- name: Get composer cache directory
id: composer-cache
Expand Down
2 changes: 1 addition & 1 deletion examples/symfony-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xml, ctype, iconv, mysql
extensions: mbstring, xml, ctype, iconv, mysql
coverage: xdebug #optional
- name: Get composer cache directory
id: composer-cache
Expand Down
2 changes: 1 addition & 1 deletion examples/symfony-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xml, ctype, iconv, pgsql
extensions: mbstring, xml, ctype, iconv, pgsql
coverage: xdebug #optional
- name: Get composer cache directory
id: composer-cache
Expand Down
2 changes: 1 addition & 1 deletion examples/symfony.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, xml, ctype, iconv
extensions: mbstring, xml, ctype, iconv
coverage: xdebug #optional
- name: Get composer cache directory
id: composer-cache
Expand Down
2 changes: 1 addition & 1 deletion examples/yii2-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with:
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
- name: Get composer cache directory
id: composer-cache
Expand Down
2 changes: 1 addition & 1 deletion examples/yii2-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with:
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
- name: Get composer cache directory
id: composer-cache
Expand Down
2 changes: 1 addition & 1 deletion examples/zend-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
uses: shivammathur/setup-php@v1 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extension-csv: mbstring, bcmath, curl, intl
extensions: mbstring, bcmath, curl, intl
coverage: xdebug #optional
- name: Get composer cache directory
id: composer-cache
Expand Down
8 changes: 6 additions & 2 deletions src/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ export async function build(
os_version: string
): Promise<string> {
// taking inputs
const extension_csv: string = await utils.getInput('extension-csv', false);
const ini_values_csv: string = await utils.getInput('ini-values-csv', false);
const extension_csv: string =
(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);

let script: string = await utils.readScript(filename, version, os_version);
Expand Down

0 comments on commit e4fc767

Please sign in to comment.