mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 21:33:06 +07:00
Add support for phplint
This commit is contained in:
parent
dd27d4eb81
commit
6158538131
@ -148,7 +148,7 @@ with:
|
|||||||
|
|
||||||
These tools can be setup globally using the `tools` input.
|
These tools can be setup globally using the `tools` input.
|
||||||
|
|
||||||
`blackfire`, `blackfire-player`, `codeception`, `composer`, `composer-prefetcher`, `cs2pr`, `deployer`, `flex`, `infection`, `pecl`, `phan`, `phinx`, `phive`, `phpcbf`, `phpcpd`, `php-config`, `php-cs-fixer`, `phpcs`, `phpize`, `phpmd`, `phpstan`, `phpunit`, `prestissimo`, `psalm`, `symfony`, `vapor-cli`
|
`blackfire`, `blackfire-player`, `codeception`, `composer`, `composer-prefetcher`, `cs2pr`, `deployer`, `flex`, `infection`, `pecl`, `phan`, `phinx`, `phive`, `php-config`, `php-cs-fixer`, `phpcbf`, `phpcpd`, `phpcs`, `phpize`, `phplint`, `phpmd`, `phpstan`, `phpunit`, `prestissimo`, `psalm`, `symfony`, `vapor-cli`
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
uses: shivammathur/setup-php@v2
|
uses: shivammathur/setup-php@v2
|
||||||
|
@ -384,7 +384,7 @@ describe('Tools tests', () => {
|
|||||||
|
|
||||||
it('checking addTools on linux', async () => {
|
it('checking addTools on linux', async () => {
|
||||||
const script: string = await tools.addTools(
|
const script: string = await tools.addTools(
|
||||||
'blackfire, blackfire-player, cs2pr, flex, php-cs-fixer, phpstan, phpunit, pecl, phinx, phinx:1.2.3, phive, php-config, phpize, symfony, wp-cli',
|
'blackfire, blackfire-player, cs2pr, flex, php-cs-fixer, phplint, phpstan, phpunit, pecl, phinx, phinx:1.2.3, phive, php-config, phpize, symfony, wp-cli',
|
||||||
'7.4',
|
'7.4',
|
||||||
'linux'
|
'linux'
|
||||||
);
|
);
|
||||||
@ -419,6 +419,7 @@ describe('Tools tests', () => {
|
|||||||
expect(script).toContain('add_pecl');
|
expect(script).toContain('add_pecl');
|
||||||
expect(script).toContain('add_composertool flex flex symfony/');
|
expect(script).toContain('add_composertool flex flex symfony/');
|
||||||
expect(script).toContain('add_composertool phinx phinx robmorgan/');
|
expect(script).toContain('add_composertool phinx phinx robmorgan/');
|
||||||
|
expect(script).toContain('add_composertool phplint phplint overtrue/');
|
||||||
expect(script).toContain('add_composertool phinx phinx:1.2.3 robmorgan/');
|
expect(script).toContain('add_composertool phinx phinx:1.2.3 robmorgan/');
|
||||||
expect(script).toContain('add_devtools');
|
expect(script).toContain('add_devtools');
|
||||||
expect(script).toContain('add_log "$tick" "php-config" "Added"');
|
expect(script).toContain('add_log "$tick" "php-config" "Added"');
|
||||||
|
5
dist/index.js
vendored
5
dist/index.js
vendored
@ -1918,7 +1918,7 @@ async function getCleanedToolsList(tools_csv) {
|
|||||||
.map(function (extension) {
|
.map(function (extension) {
|
||||||
return extension
|
return extension
|
||||||
.trim()
|
.trim()
|
||||||
.replace(/symfony\/|laravel\/|robmorgan\/|hirak\/|narrowspark\/automatic-/, '');
|
.replace(/hirak\/|laravel\/|narrowspark\/automatic-|overtrue\/|robmorgan\/|symfony\//, '');
|
||||||
})
|
})
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
return [...new Set(tools_list)];
|
return [...new Set(tools_list)];
|
||||||
@ -2062,6 +2062,9 @@ async function addTools(tools_csv, php_version, os_version) {
|
|||||||
case 'phinx':
|
case 'phinx':
|
||||||
script += await addPackage(tool, release, 'robmorgan/', os_version);
|
script += await addPackage(tool, release, 'robmorgan/', os_version);
|
||||||
break;
|
break;
|
||||||
|
case 'phplint':
|
||||||
|
script += await addPackage(tool, release, 'overtrue/', os_version);
|
||||||
|
break;
|
||||||
case 'prestissimo':
|
case 'prestissimo':
|
||||||
script += await addPackage(tool, release, 'hirak/', os_version);
|
script += await addPackage(tool, release, 'hirak/', os_version);
|
||||||
break;
|
break;
|
||||||
|
@ -358,7 +358,7 @@ export async function getCleanedToolsList(
|
|||||||
return extension
|
return extension
|
||||||
.trim()
|
.trim()
|
||||||
.replace(
|
.replace(
|
||||||
/symfony\/|laravel\/|robmorgan\/|hirak\/|narrowspark\/automatic-/,
|
/hirak\/|laravel\/|narrowspark\/automatic-|overtrue\/|robmorgan\/|symfony\//,
|
||||||
''
|
''
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
@ -539,6 +539,9 @@ export async function addTools(
|
|||||||
case 'phinx':
|
case 'phinx':
|
||||||
script += await addPackage(tool, release, 'robmorgan/', os_version);
|
script += await addPackage(tool, release, 'robmorgan/', os_version);
|
||||||
break;
|
break;
|
||||||
|
case 'phplint':
|
||||||
|
script += await addPackage(tool, release, 'overtrue/', os_version);
|
||||||
|
break;
|
||||||
case 'prestissimo':
|
case 'prestissimo':
|
||||||
script += await addPackage(tool, release, 'hirak/', os_version);
|
script += await addPackage(tool, release, 'hirak/', os_version);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user