mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-23 04:11: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.
|
||||
|
||||
`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
|
||||
uses: shivammathur/setup-php@v2
|
||||
|
@ -384,7 +384,7 @@ describe('Tools tests', () => {
|
||||
|
||||
it('checking addTools on linux', async () => {
|
||||
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',
|
||||
'linux'
|
||||
);
|
||||
@ -419,6 +419,7 @@ describe('Tools tests', () => {
|
||||
expect(script).toContain('add_pecl');
|
||||
expect(script).toContain('add_composertool flex flex symfony/');
|
||||
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_devtools');
|
||||
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) {
|
||||
return extension
|
||||
.trim()
|
||||
.replace(/symfony\/|laravel\/|robmorgan\/|hirak\/|narrowspark\/automatic-/, '');
|
||||
.replace(/hirak\/|laravel\/|narrowspark\/automatic-|overtrue\/|robmorgan\/|symfony\//, '');
|
||||
})
|
||||
.filter(Boolean);
|
||||
return [...new Set(tools_list)];
|
||||
@ -2062,6 +2062,9 @@ async function addTools(tools_csv, php_version, os_version) {
|
||||
case 'phinx':
|
||||
script += await addPackage(tool, release, 'robmorgan/', os_version);
|
||||
break;
|
||||
case 'phplint':
|
||||
script += await addPackage(tool, release, 'overtrue/', os_version);
|
||||
break;
|
||||
case 'prestissimo':
|
||||
script += await addPackage(tool, release, 'hirak/', os_version);
|
||||
break;
|
||||
|
@ -358,7 +358,7 @@ export async function getCleanedToolsList(
|
||||
return extension
|
||||
.trim()
|
||||
.replace(
|
||||
/symfony\/|laravel\/|robmorgan\/|hirak\/|narrowspark\/automatic-/,
|
||||
/hirak\/|laravel\/|narrowspark\/automatic-|overtrue\/|robmorgan\/|symfony\//,
|
||||
''
|
||||
);
|
||||
})
|
||||
@ -539,6 +539,9 @@ export async function addTools(
|
||||
case 'phinx':
|
||||
script += await addPackage(tool, release, 'robmorgan/', os_version);
|
||||
break;
|
||||
case 'phplint':
|
||||
script += await addPackage(tool, release, 'overtrue/', os_version);
|
||||
break;
|
||||
case 'prestissimo':
|
||||
script += await addPackage(tool, release, 'hirak/', os_version);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user